Patchwork [07/14] pybootchartgui: No need to do a double list comprehension over files

login
register
mail settings
Submitter Peter Kjellerstedt
Date Nov. 15, 2013, 5:08 p.m.
Message ID <86ff7ddcfd5b25285ea32d040f9ddac05dacdff5.1384535211.git.pkj@axis.com>
Download mbox | patch
Permalink /patch/61807/
State New
Headers show

Comments

Peter Kjellerstedt - Nov. 15, 2013, 5:08 p.m.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 scripts/pybootchartgui/pybootchartgui/parsing.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch

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