Unbreak non-stdout review script invocations.

The API directory wasn't making it onto sys.path in time anymore.

(imported from commit d4ed145913e0119d56de435811f793895da175fe)
This commit is contained in:
Jessica McKellar 2013-10-07 15:23:26 -04:00
parent 51e0bea608
commit cdc6c50620
1 changed files with 3 additions and 3 deletions

View File

@ -49,6 +49,9 @@ from time import sleep
from signal import SIGINT, SIGTERM from signal import SIGINT, SIGTERM
from errno import EAGAIN from errno import EAGAIN
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../api'))
import zulip
usage = """ usage = """
%%prog -r <reviewer> [-r <another-reviewer>] [-T <alt tmp dir>] [-s <summary>] [-m <message>] [options] {<since>|<revision-range>} %%prog -r <reviewer> [-r <another-reviewer>] [-T <alt tmp dir>] [-s <summary>] [-m <message>] [options] {<since>|<revision-range>}
@ -385,7 +388,6 @@ def main(args):
return 2 return 2
if not opts.stdout: if not opts.stdout:
import zulip
client = zulip.Client(verbose=True) client = zulip.Client(verbose=True)
if 'staging' not in client.base_url: if 'staging' not in client.base_url:
@ -445,8 +447,6 @@ def main(args):
print >>sys.stdout print >>sys.stdout
print >>sys.stdout, msg.get_payload(decode=True), print >>sys.stdout, msg.get_payload(decode=True),
else: else:
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../api'))
reviewer_usernames = [x.split("@")[0] for x in opts.reviewers] reviewer_usernames = [x.split("@")[0] for x in opts.reviewers]
content = ("Sent a review request to %s for\n%s" % content = ("Sent a review request to %s for\n%s" %