summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2019-12-24 14:51:10 (GMT)
committerMats Wichmann <mats@linux.com>2019-12-24 14:51:10 (GMT)
commitcac7a17bad265db91ba06c9c97862d31edca306d (patch)
treecfccc7786b3bbcdd5ccb7dd80e15897372d7416f
parenta5359e3f10a6bcdb5d9667c95c40ddd890b551e8 (diff)
downloadSCons-cac7a17bad265db91ba06c9c97862d31edca306d.zip
SCons-cac7a17bad265db91ba06c9c97862d31edca306d.tar.gz
SCons-cac7a17bad265db91ba06c9c97862d31edca306d.tar.bz2
[PR #3509] change tuple syntax per review comment [ci skip]
A couple of tools in bin had argument-handling lines that looked like: elif o in ('--username') original change made that into a tuple: ('--username',) except where I missed it and the parens were just dropped. Now these are elif o == '--username' Skipped CI builds on this one since the change doesn't affect scons code itself and is not run by CI. Signed-off-by: Mats Wichmann <mats@linux.com>
-rw-r--r--bin/scons-diff.py6
-rwxr-xr-xbin/scons_dev_master.py4
2 files changed, 5 insertions, 5 deletions
diff --git a/bin/scons-diff.py b/bin/scons-diff.py
index 0bed74b..c62b926 100644
--- a/bin/scons-diff.py
+++ b/bin/scons-diff.py
@@ -54,16 +54,16 @@ for o, a in opts:
elif o in ('-h', '--help'):
print(Usage)
sys.exit(0)
- elif o in ('-n',):
+ elif o == '-n':
diff_options.append(o)
edit_type = o
- elif o in ('-q',):
+ elif o == '-q':
diff_type = o
diff_line = lambda l, r: None
elif o in ('-r', '--recursive'):
recursive = True
diff_options.append(o)
- elif o in ('-s',):
+ elif o '-s':
report_same = True
try:
diff --git a/bin/scons_dev_master.py b/bin/scons_dev_master.py
index d4c8e90..c8cc0f9 100755
--- a/bin/scons_dev_master.py
+++ b/bin/scons_dev_master.py
@@ -152,11 +152,11 @@ Usage: scons_dev_master.py [-hnqy] [--password PASSWORD] [--username USER]
sys.exit(0)
elif o in ('-n', '--no-exec'):
CommandRunner.execute = CommandRunner.do_not_execute
- elif o in '--password':
+ elif o == '--password':
password = a
elif o in ('-q', '--quiet'):
CommandRunner.display = CommandRunner.do_not_display
- elif o in '--username':
+ elif o == '--username':
username = a
elif o in ('-y', '--yes', '--assume-yes'):
yesflag = o