[OE-core] [PATCH 07/14] pybootchartgui: No need to do a double list comprehension over files

Peter Kjellerstedt peter.kjellerstedt at axis.com
Fri Nov 15 17:08:56 UTC 2013


Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
---
 scripts/pybootchartgui/pybootchartgui/parsing.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py
index c8a6a57..ed61825 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -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":
-- 
1.8.4




More information about the Openembedded-core mailing list