]> code.ossystems Code Review - openembedded-core.git/commitdiff
pybootchartgui: Make the -s option work again
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Tue, 21 Jan 2014 15:22:31 +0000 (16:22 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 22 Jan 2014 07:26:29 +0000 (07:26 +0000)
[YOCTO #5588]

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

index daee5932cf00ff453e1ef61fee100271233095e2..0600b5162bc537a56f0878a0c7c281e0fcf80f42 100644 (file)
@@ -50,9 +50,10 @@ class Trace:
         self.parent_map = None
         self.mem_stats = None
 
-        parse_paths (writer, self, paths)
-        if not self.valid():
-            raise ParseError("empty state: '%s' does not contain a valid bootchart" % ", ".join(paths))
+        if len(paths):
+            parse_paths (writer, self, paths)
+            if not self.valid():
+                raise ParseError("empty state: '%s' does not contain a valid bootchart" % ", ".join(paths))
 
         return
 
@@ -713,7 +714,7 @@ def split_res(res, n):
         start = 0
         end = frag_size
         while start < end:
-            state = ParserState()
+            state = Trace(None, [], None)
             for i in range(start, end):
                 # Add these lines for reference
                 #state.processes[pn + ":" + task] = [start, end]