From c54215fc774f86c0bf5065c2e861fbabfa625918 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Mon, 13 Feb 2017 21:26:17 +0800 Subject: collect_yaml.py: Use list comprehension instead of map --- scripts/collect_yaml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/collect_yaml.py') 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) -- cgit v1.2.2