diff options
Diffstat (limited to 'bitbake-dev/lib/bb/ui/knotty.py')
-rw-r--r-- | bitbake-dev/lib/bb/ui/knotty.py | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/bitbake-dev/lib/bb/ui/knotty.py b/bitbake-dev/lib/bb/ui/knotty.py index 8a2afeeb6d..6baed836a1 100644 --- a/bitbake-dev/lib/bb/ui/knotty.py +++ b/bitbake-dev/lib/bb/ui/knotty.py | |||
@@ -53,29 +53,29 @@ def init(server, eventHandler): | |||
53 | if event is None: | 53 | if event is None: |
54 | continue | 54 | continue |
55 | #print event | 55 | #print event |
56 | if event[0].startswith('bb.msg.MsgPlain'): | 56 | if isinstance(event, bb.msg.MsgPlain): |
57 | print event[1]['_message'] | 57 | print event._message |
58 | continue | 58 | continue |
59 | if event[0].startswith('bb.msg.MsgDebug'): | 59 | if isinstance(event, bb.msg.MsgDebug): |
60 | print 'DEBUG: ' + event[1]['_message'] | 60 | print 'DEBUG: ' + event._message |
61 | continue | 61 | continue |
62 | if event[0].startswith('bb.msg.MsgNote'): | 62 | if isinstance(event, bb.msg.MsgNote): |
63 | print 'NOTE: ' + event[1]['_message'] | 63 | print 'NOTE: ' + event._message |
64 | continue | 64 | continue |
65 | if event[0].startswith('bb.msg.MsgWarn'): | 65 | if isinstance(event, bb.msg.MsgWarn): |
66 | print 'WARNING: ' + event[1]['_message'] | 66 | print 'WARNING: ' + event._message |
67 | continue | 67 | continue |
68 | if event[0].startswith('bb.msg.MsgError'): | 68 | if isinstance(event, bb.msg.MsgError): |
69 | return_value = 1 | 69 | return_value = 1 |
70 | print 'ERROR: ' + event[1]['_message'] | 70 | print 'ERROR: ' + event._message |
71 | continue | 71 | continue |
72 | if event[0].startswith('bb.msg.MsgFatal'): | 72 | if isinstance(event, bb.msg.MsgFatal): |
73 | return_value = 1 | 73 | return_value = 1 |
74 | print 'FATAL: ' + event[1]['_message'] | 74 | print 'FATAL: ' + event._message |
75 | break | 75 | break |
76 | if event[0].startswith('bb.build.TaskFailed'): | 76 | if isinstance(event, bb.build.TaskFailed): |
77 | return_value = 1 | 77 | return_value = 1 |
78 | logfile = event[1]['logfile'] | 78 | logfile = event.logfile |
79 | if logfile: | 79 | if logfile: |
80 | print "ERROR: Logfile of failure stored in %s." % logfile | 80 | print "ERROR: Logfile of failure stored in %s." % logfile |
81 | if 1 or includelogs: | 81 | if 1 or includelogs: |
@@ -97,12 +97,12 @@ def init(server, eventHandler): | |||
97 | if lines: | 97 | if lines: |
98 | for line in lines: | 98 | for line in lines: |
99 | print line | 99 | print line |
100 | if event[0].startswith('bb.build.Task'): | 100 | if isinstance(event, bb.build.TaskBase): |
101 | print "NOTE: %s" % event[1]['_message'] | 101 | print "NOTE: %s" % event._message |
102 | continue | 102 | continue |
103 | if event[0].startswith('bb.event.ParseProgress'): | 103 | if isinstance(event, bb.event.ParseProgress): |
104 | x = event[1]['sofar'] | 104 | x = event.sofar |
105 | y = event[1]['total'] | 105 | y = event.total |
106 | if os.isatty(sys.stdout.fileno()): | 106 | if os.isatty(sys.stdout.fileno()): |
107 | sys.stdout.write("\rNOTE: Handling BitBake files: %s (%04d/%04d) [%2d %%]" % ( parsespin.next(), x, y, x*100/y ) ) | 107 | sys.stdout.write("\rNOTE: Handling BitBake files: %s (%04d/%04d) [%2d %%]" % ( parsespin.next(), x, y, x*100/y ) ) |
108 | sys.stdout.flush() | 108 | sys.stdout.flush() |
@@ -115,35 +115,35 @@ def init(server, eventHandler): | |||
115 | sys.stdout.flush() | 115 | sys.stdout.flush() |
116 | if x == y: | 116 | if x == y: |
117 | print("\nParsing finished. %d cached, %d parsed, %d skipped, %d masked, %d errors." | 117 | print("\nParsing finished. %d cached, %d parsed, %d skipped, %d masked, %d errors." |
118 | % ( event[1]['cached'], event[1]['parsed'], event[1]['skipped'], event[1]['masked'], event[1]['errors'])) | 118 | % ( event.cached, event.parsed, event.skipped, event.masked, event.errors)) |
119 | continue | 119 | continue |
120 | 120 | ||
121 | if event[0] == 'bb.command.CookerCommandCompleted': | 121 | if isinstance(event, bb.command.CookerCommandCompleted): |
122 | break | 122 | break |
123 | if event[0] == 'bb.command.CookerCommandSetExitCode': | 123 | if isinstance(event, bb.command.CookerCommandSetExitCode): |
124 | return_value = event[1]['exitcode'] | 124 | return_value = event.exitcode |
125 | continue | 125 | continue |
126 | if event[0] == 'bb.command.CookerCommandFailed': | 126 | if isinstance(event, bb.command.CookerCommandFailed): |
127 | return_value = 1 | 127 | return_value = 1 |
128 | print "Command execution failed: %s" % event[1]['error'] | 128 | print "Command execution failed: %s" % event.error |
129 | break | 129 | break |
130 | if event[0] == 'bb.cooker.CookerExit': | 130 | if isinstance(event, bb.cooker.CookerExit): |
131 | break | 131 | break |
132 | 132 | ||
133 | # ignore | 133 | # ignore |
134 | if event[0].startswith('bb.event.BuildStarted'): | 134 | if isinstance(event, bb.event.BuildStarted): |
135 | continue | 135 | continue |
136 | if event[0].startswith('bb.event.BuildCompleted'): | 136 | if isinstance(event, bb.event.BuildCompleted): |
137 | continue | 137 | continue |
138 | if event[0].startswith('bb.event.MultipleProviders'): | 138 | if isinstance(event, bb.event.MultipleProviders): |
139 | continue | 139 | continue |
140 | if event[0].startswith('bb.runqueue.runQueue'): | 140 | if isinstance(event, bb.runqueue.runQueueEvent): |
141 | continue | 141 | continue |
142 | if event[0].startswith('bb.event.StampUpdate'): | 142 | if isinstance(event, bb.event.StampUpdate): |
143 | continue | 143 | continue |
144 | if event[0].startswith('bb.event.ConfigParsed'): | 144 | if isinstance(event, bb.event.ConfigParsed): |
145 | continue | 145 | continue |
146 | if event[0].startswith('bb.event.RecipeParsed'): | 146 | if isinstance(event, bb.event.RecipeParsed): |
147 | continue | 147 | continue |
148 | print "Unknown Event: %s" % event | 148 | print "Unknown Event: %s" % event |
149 | 149 | ||