fix git-cl-try without parameters
Master names were confused with bucket names
R=tandrii@chromium.org, qyearsley@chromium.org
BUG=661580
Review-Url: https://codereview.chromium.org/2482523002
diff --git a/git_cl.py b/git_cl.py
index 66bb768..9833747 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -350,7 +350,7 @@
change = changelist.GetChange(
changelist.GetCommonAncestorWithUpstream(), None)
# Get try masters from PRESUBMIT.py files.
- return presubmit_support.DoGetTryMasters(
+ masters = presubmit_support.DoGetTryMasters(
change=change,
changed_files=change.LocalPaths(),
repository_root=settings.GetRoot(),
@@ -358,6 +358,9 @@
project=None,
verbose=options.verbose,
output_stream=sys.stdout)
+ if masters is None:
+ return None
+ return {MASTER_PREFIX + m: b for m, b in masters.iteritems()}
if options.bucket:
return {options.bucket: {b: [] for b in options.bot}}