diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-01-19 14:48:19 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-01-19 14:48:19 +0000 |
commit | 22a271aaa99daeb6b29c42c2c1dc670bf204310e (patch) | |
tree | d2690b66e7a613820f34ceaecbce65809cbd22a3 /bitbake-dev/lib/bb/ui/crumbs/runningbuild.py | |
parent | cefe87fc3c4202e942f34666813bc094df2ffb4b (diff) | |
download | poky-22a271aaa99daeb6b29c42c2c1dc670bf204310e.tar.gz |
bitbake-dev: Sync with upstream
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake-dev/lib/bb/ui/crumbs/runningbuild.py')
-rw-r--r-- | bitbake-dev/lib/bb/ui/crumbs/runningbuild.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/bitbake-dev/lib/bb/ui/crumbs/runningbuild.py b/bitbake-dev/lib/bb/ui/crumbs/runningbuild.py index 34f65d2396..401559255b 100644 --- a/bitbake-dev/lib/bb/ui/crumbs/runningbuild.py +++ b/bitbake-dev/lib/bb/ui/crumbs/runningbuild.py | |||
@@ -61,36 +61,36 @@ class RunningBuild (gobject.GObject): | |||
61 | # If we have a pid attached to this message/event try and get the | 61 | # If we have a pid attached to this message/event try and get the |
62 | # (package, task) pair for it. If we get that then get the parent iter | 62 | # (package, task) pair for it. If we get that then get the parent iter |
63 | # for the message. | 63 | # for the message. |
64 | if event[1].has_key ('pid'): | 64 | if hassattr(event, 'pid'): |
65 | pid = event[1]['pid'] | 65 | pid = event.pid |
66 | if self.pids_to_task.has_key(pid): | 66 | if self.pids_to_task.has_key(pid): |
67 | (package, task) = self.pids_to_task[pid] | 67 | (package, task) = self.pids_to_task[pid] |
68 | parent = self.tasks_to_iter[(package, task)] | 68 | parent = self.tasks_to_iter[(package, task)] |
69 | 69 | ||
70 | if event[0].startswith('bb.msg.Msg'): | 70 | if isinstance(event, bb.msg.Msg): |
71 | # Set a pretty icon for the message based on it's type. | 71 | # Set a pretty icon for the message based on it's type. |
72 | if (event[0].startswith ('bb.msg.MsgWarn')): | 72 | if isinstance(event, bb.msg.MsgWarn): |
73 | icon = "dialog-warning" | 73 | icon = "dialog-warning" |
74 | elif (event[0].startswith ('bb.msg.MsgErr')): | 74 | elif isinstance(event, bb.msg.MsgErr): |
75 | icon = "dialog-error" | 75 | icon = "dialog-error" |
76 | else: | 76 | else: |
77 | icon = None | 77 | icon = None |
78 | 78 | ||
79 | # Ignore the "Running task i of n .." messages | 79 | # Ignore the "Running task i of n .." messages |
80 | if (event[1]['_message'].startswith ("Running task")): | 80 | if (event._message.startswith ("Running task")): |
81 | return | 81 | return |
82 | 82 | ||
83 | # Add the message to the tree either at the top level if parent is | 83 | # Add the message to the tree either at the top level if parent is |
84 | # None otherwise as a descendent of a task. | 84 | # None otherwise as a descendent of a task. |
85 | self.model.append (parent, | 85 | self.model.append (parent, |
86 | (event[0].split()[-1], # e.g. MsgWarn, MsgError | 86 | (event.__name__.split()[-1], # e.g. MsgWarn, MsgError |
87 | package, | 87 | package, |
88 | task, | 88 | task, |
89 | event[1]['_message'], | 89 | event._message, |
90 | icon, | 90 | icon, |
91 | False)) | 91 | False)) |
92 | elif event[0].startswith('bb.build.TaskStarted'): | 92 | elif isinstance(event, bb.build.TaskStarted): |
93 | (package, task) = (event[1]['_package'], event[1]['_task']) | 93 | (package, task) = (event._package, event._task) |
94 | 94 | ||
95 | # Save out this PID. | 95 | # Save out this PID. |
96 | self.pids_to_task[pid] = (package,task) | 96 | self.pids_to_task[pid] = (package,task) |
@@ -128,9 +128,9 @@ class RunningBuild (gobject.GObject): | |||
128 | # Mark this task as active. | 128 | # Mark this task as active. |
129 | self.model.set(i, self.model.COL_ICON, "gtk-execute") | 129 | self.model.set(i, self.model.COL_ICON, "gtk-execute") |
130 | 130 | ||
131 | elif event[0].startswith('bb.build.Task'): | 131 | elif isinstance(event, bb.build.Task): |
132 | 132 | ||
133 | if event[0].startswith('bb.build.TaskFailed'): | 133 | if isinstance(event, bb.build.TaskFailed): |
134 | # Mark the task as failed | 134 | # Mark the task as failed |
135 | i = self.tasks_to_iter[(package, task)] | 135 | i = self.tasks_to_iter[(package, task)] |
136 | self.model.set(i, self.model.COL_ICON, "dialog-error") | 136 | self.model.set(i, self.model.COL_ICON, "dialog-error") |
@@ -153,8 +153,8 @@ class RunningBuild (gobject.GObject): | |||
153 | del self.tasks_to_iter[(package, task)] | 153 | del self.tasks_to_iter[(package, task)] |
154 | del self.pids_to_task[pid] | 154 | del self.pids_to_task[pid] |
155 | 155 | ||
156 | elif event[0].startswith('bb.event.BuildCompleted'): | 156 | elif isinstance(event, bb.event.BuildCompleted): |
157 | failures = int (event[1]['_failures']) | 157 | failures = int (event._failures) |
158 | 158 | ||
159 | # Emit the appropriate signal depending on the number of failures | 159 | # Emit the appropriate signal depending on the number of failures |
160 | if (failures > 1): | 160 | if (failures > 1): |