aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xtools/submit_try8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/submit_try b/tools/submit_try
index e371afb23a..6647b89e1c 100755
--- a/tools/submit_try
+++ b/tools/submit_try
@@ -286,15 +286,17 @@ def SubmitTryRequest(args, is_svn=True):
cmd = [GIT, 'diff', git_cl.Changelist().GetUpstreamBranch(),
'--no-ext-diff']
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- if proc.wait() != 0:
+ git_data = proc.communicate()
+ if git_data[0] is None:
raise Exception('Failed to capture git diff!')
temp_dir = tempfile.mkdtemp()
try:
diff_file = os.path.join(temp_dir, 'patch.diff')
with open(diff_file, 'wb') as f:
- f.write(proc.communicate()[0])
-
+ f.write(git_data[0])
+ f.close()
+
try_args = ['--use_svn',
'--svn_repo', GetTryRepo(),
'--root', GetCheckoutRoot(is_svn),