pybootchartgui: No need to do a double list comprehension over files
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Fri, 15 Nov 2013 17:08:56 +0000 (18:08 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 18 Nov 2013 12:44:07 +0000 (12:44 +0000)
(From OE-Core rev: bd00a768d88c22eabee90407684f1fb84139acfb)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/pybootchartgui/pybootchartgui/parsing.py

index c8a6a57..ed61825 100644 (file)
@@ -675,8 +675,7 @@ def parse_paths(writer, state, paths, mintime):
             continue
         #state.filename = path
         if os.path.isdir(path):
-            files = [ f for f in [os.path.join(path, f) for f in os.listdir(path)] ]
-            files.sort()
+            files = sorted([os.path.join(path, f) for f in os.listdir(path)])
             state = parse_paths(writer, state, files, mintime)
         elif extension in [".tar", ".tgz", ".gz"]:
             if extension == ".gz":