Patchwork [1/5] pybootchartgui: Make the -s option work again

login
register
mail settings
Submitter Peter Kjellerstedt
Date Jan. 21, 2014, 3:22 p.m.
Message ID <3bcb4f7daeca002c33d9f762e4813dcc076c0fc5.1390317718.git.pkj@axis.com>
Download mbox | patch
Permalink /patch/65357/
State Accepted
Commit 34a5d1e9cd7df1fb46431ffda2371f5772a4eaf9
Headers show

Comments

Peter Kjellerstedt - Jan. 21, 2014, 3:22 p.m.
[YOCTO #5588]

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 scripts/pybootchartgui/pybootchartgui/parsing.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Patch

diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py
index daee593..0600b51 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -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]