summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorCraig Rodrigues <rodrigc@FreeBSD.org>2017-03-11 18:46:09 -0800
committerCraig Rodrigues <rodrigc@FreeBSD.org>2017-03-11 18:46:09 -0800
commitc48ebf8c67a83768ab094e9572f0fc69214450ba (patch)
tree462a54045bb7f37948fb4404fed7a33579bc0b07 /src/script
parente45ba445a1140cfa4d7836f54f2e6b8d9a5c7325 (diff)
downloadscons-c48ebf8c67a83768ab094e9572f0fc69214450ba.tar.gz
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.py4
-rw-r--r--src/script/scons-time.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/script/scons-configure-cache.py b/src/script/scons-configure-cache.py
index 2648acda..73ccf184 100644
--- a/src/script/scons-configure-cache.py
+++ b/src/script/scons-configure-cache.py
@@ -99,7 +99,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...
@@ -136,4 +136,4 @@ for key in args:
# and write the updated config file
with open('config', 'w') as conf:
- json.dump(config, conf) \ No newline at end of file
+ json.dump(config, conf)
diff --git a/src/script/scons-time.py b/src/script/scons-time.py
index c788e50f..1473c42b 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]