Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: kick.py

Issue 9348252: Only show "only one mode flag can be specified" warning when two were specified (Closed)
Patch Set: Created Feb. 19, 2013, 2:41 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
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: kick.py
===================================================================
--- a/kick.py
+++ b/kick.py
@@ -30,13 +30,14 @@
usage()
sys.exit(1)
+ if set(('-t', '-q')).issubset(options):
+ print >>sys.stderr, 'Only one mode flag can be specified, either -t or -q'
+ usage()
+ sys.exit(1)
+
user = None
mode = ' --test'
for option, value in options:
- if option in ('-t', '-q') and mode != '':
- print >>sys.stderr, 'Only one mode flag can be specified, either -t or -q'
- usage()
- sys.exit(1)
if option == '-u':
user = value
elif option == '-q':
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld