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

Unified Diff: gcl.py

Issue 2671003: Fix a bug in Warn(), simplify code (Closed)
Patch Set: Created 10 years, 7 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: gcl.py
diff --git a/gcl.py b/gcl.py
index 55144ccf45076224a75239c829c9c20b9be580b1..e8532e12d8be914a6383f25e3e5f75fb8e7a97b6 100755
--- a/gcl.py
+++ b/gcl.py
@@ -184,14 +184,12 @@ def GetCodeReviewSetting(key):
def Warn(msg):
- ErrorExit(msg, exit=False)
+ print >> sys.stderr, msg
-def ErrorExit(msg, do_exit=True):
- """Print an error message to stderr and optionally exit."""
+def ErrorExit(msg):
print >> sys.stderr, msg
- if do_exit:
- sys.exit(1)
+ sys.exit(1)
def RunShellWithReturnCode(command, print_output=False):
« 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