diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-03-13 14:56:49 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-03-13 14:56:49 (GMT) |
commit | 9d977ce28597968f92929d708d56b10a58a35041 (patch) | |
tree | 460a8f64c3d54e14d24abf193255a731a28ceb80 /src/script | |
parent | 2612afc1f93b213cd577429970d32cce73caae8b (diff) | |
parent | 056622b43309af38e4b6dcbbdcdd0e7b9b176a0d (diff) | |
download | SCons-9d977ce28597968f92929d708d56b10a58a35041.zip SCons-9d977ce28597968f92929d708d56b10a58a35041.tar.gz SCons-9d977ce28597968f92929d708d56b10a58a35041.tar.bz2 |
Merged in rodrigc/scons (pull request #410)
When iterating over dict.items(), we do not need a new list.
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/scons-configure-cache.py | 2 | ||||
-rw-r--r-- | src/script/scons-time.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/script/scons-configure-cache.py b/src/script/scons-configure-cache.py index 369f817..0fc7b48 100644 --- a/src/script/scons-configure-cache.py +++ b/src/script/scons-configure-cache.py @@ -101,7 +101,7 @@ for param in config_entries: parser.add_argument('--version', action='version', version='%(prog)s 1.0') # Get the command line as a dict without any of the unspecified entries. -args = dict([x for x in list(vars(parser.parse_args()).items()) if x[1]]) +args = dict([x for x in vars(parser.parse_args()).items() if x[1]]) # It seems somewhat strange to me, but positional arguments don't get the - # in the name changed to _, whereas optional arguments do... diff --git a/src/script/scons-time.py b/src/script/scons-time.py index c788e50..1473c42 100644 --- a/src/script/scons-time.py +++ b/src/script/scons-time.py @@ -654,7 +654,7 @@ class SConsTimer(object): sys.stderr.write('%s Cannot use the "func" subcommand.\n' % self.name_spaces) sys.exit(1) statistics = pstats.Stats(file).stats - matches = [ e for e in list(statistics.items()) if e[0][2] == function ] + matches = [ e for e in statistics.items() if e[0][2] == function ] r = matches[0] return r[0][0], r[0][1], r[0][2], r[1][3] |