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

Unified Diff: gcl.py

Issue 2366002: Fix argument checking in gcl.py (Closed)
Patch Set: Better style 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 66c3389f6acf2e37e02afc6e71d4977a3480bb01..c8756e14bb41297e8047705be256eb64e61294da 100755
--- a/gcl.py
+++ b/gcl.py
@@ -667,6 +667,8 @@ def need_change(function):
def need_change_and_args(function):
"""Converts args -> change_info."""
def hook(args):
+ if not args:
+ ErrorExit("You need to pass a change list name")
change_info = ChangeInfo.Load(args.pop(0), GetRepositoryRoot(), True, True)
return function(change_info, args)
defer_attributes(function, hook)
« 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