浏览代码

tools: fix potential python error when parsing trace.rec

Samuel Pitoiset 9 年之前
父节点
当前提交
610ec5b74b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tools/starpu_trace_state_stats.py

+ 1 - 1
tools/starpu_trace_state_stats.py

@@ -48,7 +48,7 @@ class EventStats():
         self._count += 1
 
     def show(self):
-        if not self._name == None:
+        if not self._name == None and not self._category == None:
             print "\"" + self._name + "\"," + str(self._count) + ",\"" + self._category + "\"," + str(round(self._duration_time, 6))
 
 class Worker():