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

Submitted by Peter Kjellerstedt on Nov. 15, 2013, 5:08 p.m.

Details

Message ID 86ff7ddcfd5b25285ea32d040f9ddac05dacdff5.1384535211.git.pkj@axis.com
State Accepted
Commit bd00a768d88c22eabee90407684f1fb84139acfb
Headers show

Commit Message

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 hide | download patch | download mbox

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