[oe-commits] Peter Kjellerstedt : pybootchartgui: No need to do a double list comprehension over files

git at git.openembedded.org git at git.openembedded.org
Mon Nov 18 12:44:54 UTC 2013


Module: openembedded-core.git
Branch: master
Commit: bd00a768d88c22eabee90407684f1fb84139acfb
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=bd00a768d88c22eabee90407684f1fb84139acfb

Author: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
Date:   Fri Nov 15 18:08:56 2013 +0100

pybootchartgui: No need to do a double list comprehension over files

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 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":



More information about the Openembedded-commits mailing list