Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(372)

Unified Diff: git-try

Issue 3311021: Fix git-try, was broken by r58936. (Closed)
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git-try
diff --git a/git-try b/git-try
index 9eaec61bac10819f4c36e6b9c5ff6d5ea8950bf5..e61831a5df2e7346d226d11cd6e81fe451e6d1fd 100755
--- a/git-try
+++ b/git-try
@@ -9,25 +9,32 @@ import sys
import breakpad
+import gclient_utils
from scm import GIT
import trychange
def GetRietveldIssueNumber():
- return GIT.Capture(
- ['config', 'branch.%s.rietveldissue' % GIT.GetBranch(None)],
- error_ok=True)[0]
+ try:
+ return GIT.Capture(
+ ['config', 'branch.%s.rietveldissue' % GIT.GetBranch(None)])
+ except gclient_utils.Error:
+ return None
def GetRietveldPatchsetNumber():
- return GIT.Capture(
- ['config', 'branch.%s.rietveldpatchset' % GIT.GetBranch(None)],
- error_ok=True)[0]
+ try:
+ return GIT.Capture(
+ ['config', 'branch.%s.rietveldpatchset' % GIT.GetBranch(None)])
+ except gclient_utils.Error:
+ return None
def GetRietveldServerUrl():
- return GIT.Capture(
- ['config', 'rietveld.server'], error_ok=True)[0].strip()
+ try:
+ return GIT.Capture(['config', 'rietveld.server']).strip()
+ except gclient_utils.Error:
+ return None
if __name__ == '__main__':
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698