aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2017-02-13 21:26:17 +0800
committerAaron LI <aaronly.me@outlook.com>2017-02-13 21:26:17 +0800
commitc54215fc774f86c0bf5065c2e861fbabfa625918 (patch)
tree2559d7e962aafb9fd13d8208dc55c9f41a3e72b4 /scripts
parentd00516a6a187c65f586a8629563f63bf62ce7987 (diff)
downloadchandra-acis-analysis-c54215fc774f86c0bf5065c2e861fbabfa625918.tar.bz2
collect_yaml.py: Use list comprehension instead of map
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/collect_yaml.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/collect_yaml.py b/scripts/collect_yaml.py
index b5f3172..0fb5ee6 100755
--- a/scripts/collect_yaml.py
+++ b/scripts/collect_yaml.py
@@ -38,9 +38,9 @@ def main():
args = parser.parse_args()
try:
- keys = list(map(str.strip, open(args.keys).readlines()))
+ keys = [k.strip() for k in open(args.keys).readlines()]
except FileNotFoundError:
- keys = list(map(str.strip, args.keys.split(",")))
+ keys = [k.strip() for k in args.keys.split(",")]
if args.verbose:
print("keys:", keys, file=sys.stderr)