summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/knotty.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/ui/knotty.py')
-rw-r--r--bitbake/lib/bb/ui/knotty.py44
1 files changed, 22 insertions, 22 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index 3261792dfc..dba9530ef6 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -44,10 +44,10 @@ def init(server, eventHandler):
44 return 1 44 return 1
45 ret = server.runCommand(cmdline) 45 ret = server.runCommand(cmdline)
46 if ret != True: 46 if ret != True:
47 print "Couldn't get default commandline! %s" % ret 47 print("Couldn't get default commandline! %s" % ret)
48 return 1 48 return 1
49 except xmlrpclib.Fault, x: 49 except xmlrpclib.Fault, x:
50 print "XMLRPC Fault getting commandline:\n %s" % x 50 print("XMLRPC Fault getting commandline:\n %s" % x)
51 return 1 51 return 1
52 52
53 shutdown = 0 53 shutdown = 0
@@ -65,39 +65,39 @@ def init(server, eventHandler):
65 if shutdown and helper.needUpdate: 65 if shutdown and helper.needUpdate:
66 activetasks, failedtasks = helper.getTasks() 66 activetasks, failedtasks = helper.getTasks()
67 if activetasks: 67 if activetasks:
68 print "Waiting for %s active tasks to finish:" % len(activetasks) 68 print("Waiting for %s active tasks to finish:" % len(activetasks))
69 tasknum = 1 69 tasknum = 1
70 for task in activetasks: 70 for task in activetasks:
71 print "%s: %s (pid %s)" % (tasknum, activetasks[task]["title"], task) 71 print("%s: %s (pid %s)" % (tasknum, activetasks[task]["title"], task))
72 tasknum = tasknum + 1 72 tasknum = tasknum + 1
73 73
74 if isinstance(event, bb.msg.MsgPlain): 74 if isinstance(event, bb.msg.MsgPlain):
75 print event._message 75 print(event._message)
76 continue 76 continue
77 if isinstance(event, bb.msg.MsgDebug): 77 if isinstance(event, bb.msg.MsgDebug):
78 print 'DEBUG: ' + event._message 78 print('DEBUG: ' + event._message)
79 continue 79 continue
80 if isinstance(event, bb.msg.MsgNote): 80 if isinstance(event, bb.msg.MsgNote):
81 print 'NOTE: ' + event._message 81 print('NOTE: ' + event._message)
82 continue 82 continue
83 if isinstance(event, bb.msg.MsgWarn): 83 if isinstance(event, bb.msg.MsgWarn):
84 print 'WARNING: ' + event._message 84 print('WARNING: ' + event._message)
85 continue 85 continue
86 if isinstance(event, bb.msg.MsgError): 86 if isinstance(event, bb.msg.MsgError):
87 return_value = 1 87 return_value = 1
88 print 'ERROR: ' + event._message 88 print('ERROR: ' + event._message)
89 continue 89 continue
90 if isinstance(event, bb.msg.MsgFatal): 90 if isinstance(event, bb.msg.MsgFatal):
91 return_value = 1 91 return_value = 1
92 print 'FATAL: ' + event._message 92 print('FATAL: ' + event._message)
93 break 93 break
94 if isinstance(event, bb.build.TaskFailed): 94 if isinstance(event, bb.build.TaskFailed):
95 return_value = 1 95 return_value = 1
96 logfile = event.logfile 96 logfile = event.logfile
97 if logfile: 97 if logfile:
98 print "ERROR: Logfile of failure stored in: %s" % logfile 98 print("ERROR: Logfile of failure stored in: %s" % logfile)
99 if 1 or includelogs: 99 if 1 or includelogs:
100 print "Log data follows:" 100 print("Log data follows:")
101 f = open(logfile, "r") 101 f = open(logfile, "r")
102 lines = [] 102 lines = []
103 while True: 103 while True:
@@ -110,13 +110,13 @@ def init(server, eventHandler):
110 if len(lines) > int(loglines): 110 if len(lines) > int(loglines):
111 lines.pop(0) 111 lines.pop(0)
112 else: 112 else:
113 print '| %s' % l 113 print('| %s' % l)
114 f.close() 114 f.close()
115 if lines: 115 if lines:
116 for line in lines: 116 for line in lines:
117 print line 117 print(line)
118 if isinstance(event, bb.build.TaskBase): 118 if isinstance(event, bb.build.TaskBase):
119 print "NOTE: %s" % event._message 119 print("NOTE: %s" % event._message)
120 continue 120 continue
121 if isinstance(event, bb.event.ParseProgress): 121 if isinstance(event, bb.event.ParseProgress):
122 x = event.sofar 122 x = event.sofar
@@ -132,8 +132,8 @@ def init(server, eventHandler):
132 sys.stdout.write("done.") 132 sys.stdout.write("done.")
133 sys.stdout.flush() 133 sys.stdout.flush()
134 if x == y: 134 if x == y:
135 print("\nParsing of %d .bb files complete (%d cached, %d parsed). %d targets, %d skipped, %d masked, %d errors." 135 print(("\nParsing of %d .bb files complete (%d cached, %d parsed). %d targets, %d skipped, %d masked, %d errors."
136 % ( event.total, event.cached, event.parsed, event.virtuals, event.skipped, event.masked, event.errors)) 136 % ( event.total, event.cached, event.parsed, event.virtuals, event.skipped, event.masked, event.errors)))
137 continue 137 continue
138 138
139 if isinstance(event, bb.command.CookerCommandCompleted): 139 if isinstance(event, bb.command.CookerCommandCompleted):
@@ -143,7 +143,7 @@ def init(server, eventHandler):
143 continue 143 continue
144 if isinstance(event, bb.command.CookerCommandFailed): 144 if isinstance(event, bb.command.CookerCommandFailed):
145 return_value = 1 145 return_value = 1
146 print "Command execution failed: %s" % event.error 146 print("Command execution failed: %s" % event.error)
147 break 147 break
148 if isinstance(event, bb.cooker.CookerExit): 148 if isinstance(event, bb.cooker.CookerExit):
149 break 149 break
@@ -165,17 +165,17 @@ def init(server, eventHandler):
165 continue 165 continue
166 if isinstance(event, bb.event.RecipeParsed): 166 if isinstance(event, bb.event.RecipeParsed):
167 continue 167 continue
168 print "Unknown Event: %s" % event 168 print("Unknown Event: %s" % event)
169 169
170 except KeyboardInterrupt: 170 except KeyboardInterrupt:
171 if shutdown == 2: 171 if shutdown == 2:
172 print "\nThird Keyboard Interrupt, exit.\n" 172 print("\nThird Keyboard Interrupt, exit.\n")
173 break 173 break
174 if shutdown == 1: 174 if shutdown == 1:
175 print "\nSecond Keyboard Interrupt, stopping...\n" 175 print("\nSecond Keyboard Interrupt, stopping...\n")
176 server.runCommand(["stateStop"]) 176 server.runCommand(["stateStop"])
177 if shutdown == 0: 177 if shutdown == 0:
178 print "\nKeyboard Interrupt, closing down...\n" 178 print("\nKeyboard Interrupt, closing down...\n")
179 server.runCommand(["stateShutdown"]) 179 server.runCommand(["stateShutdown"])
180 shutdown = shutdown + 1 180 shutdown = shutdown + 1
181 pass 181 pass