diff options
| author | Chris Larson <chris_larson@mentor.com> | 2010-04-09 19:46:14 -0700 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-07-02 15:41:33 +0100 |
| commit | ad543e2e41b7e86d83cf0518b096ef82627bf891 (patch) | |
| tree | f8f3c5d4f759f3169a937db1da6858a11aa938fa /bitbake/lib/bb/ui | |
| parent | 978b5c946683885a64ee9e7c2064ff696f05cddb (diff) | |
| download | poky-ad543e2e41b7e86d83cf0518b096ef82627bf891.tar.gz | |
Apply the 2to3 print function transform
(Bitbake rev: ff2e28d0d9723ccd0e9dd635447b6d889cc9f597)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/ui')
| -rw-r--r-- | bitbake/lib/bb/ui/crumbs/buildmanager.py | 4 | ||||
| -rw-r--r-- | bitbake/lib/bb/ui/depexp.py | 18 | ||||
| -rw-r--r-- | bitbake/lib/bb/ui/goggle.py | 6 | ||||
| -rw-r--r-- | bitbake/lib/bb/ui/knotty.py | 44 | ||||
| -rw-r--r-- | bitbake/lib/bb/ui/ncurses.py | 6 | ||||
| -rw-r--r-- | bitbake/lib/bb/ui/puccho.py | 10 |
6 files changed, 44 insertions, 44 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/buildmanager.py b/bitbake/lib/bb/ui/crumbs/buildmanager.py index f5a15329d5..37a62f189f 100644 --- a/bitbake/lib/bb/ui/crumbs/buildmanager.py +++ b/bitbake/lib/bb/ui/crumbs/buildmanager.py | |||
| @@ -158,7 +158,7 @@ class BuildResult(gobject.GObject): | |||
| 158 | # pull it out. | 158 | # pull it out. |
| 159 | # TODO: Better to stat a file? | 159 | # TODO: Better to stat a file? |
| 160 | (_ , date, revision) = identifier.split ("-") | 160 | (_ , date, revision) = identifier.split ("-") |
| 161 | print date | 161 | print(date) |
| 162 | 162 | ||
| 163 | year = int (date[0:4]) | 163 | year = int (date[0:4]) |
| 164 | month = int (date[4:6]) | 164 | month = int (date[4:6]) |
| @@ -386,7 +386,7 @@ class BuildManager (gobject.GObject): | |||
| 386 | server.runCommand(["buildTargets", [conf.image], "rootfs"]) | 386 | server.runCommand(["buildTargets", [conf.image], "rootfs"]) |
| 387 | 387 | ||
| 388 | except Exception, e: | 388 | except Exception, e: |
| 389 | print e | 389 | print(e) |
| 390 | 390 | ||
| 391 | class BuildManagerTreeView (gtk.TreeView): | 391 | class BuildManagerTreeView (gtk.TreeView): |
| 392 | """ The tree view for the build manager. This shows the historic builds | 392 | """ The tree view for the build manager. This shows the historic builds |
diff --git a/bitbake/lib/bb/ui/depexp.py b/bitbake/lib/bb/ui/depexp.py index c596cad5cf..e386e34958 100644 --- a/bitbake/lib/bb/ui/depexp.py +++ b/bitbake/lib/bb/ui/depexp.py | |||
| @@ -201,14 +201,14 @@ def init(server, eventHandler): | |||
| 201 | try: | 201 | try: |
| 202 | cmdline = server.runCommand(["getCmdLineAction"]) | 202 | cmdline = server.runCommand(["getCmdLineAction"]) |
| 203 | if not cmdline or cmdline[0] != "generateDotGraph": | 203 | if not cmdline or cmdline[0] != "generateDotGraph": |
| 204 | print "This UI is only compatible with the -g option" | 204 | print("This UI is only compatible with the -g option") |
| 205 | return | 205 | return |
| 206 | ret = server.runCommand(["generateDepTreeEvent", cmdline[1], cmdline[2]]) | 206 | ret = server.runCommand(["generateDepTreeEvent", cmdline[1], cmdline[2]]) |
| 207 | if ret != True: | 207 | if ret != True: |
| 208 | print "Couldn't run command! %s" % ret | 208 | print("Couldn't run command! %s" % ret) |
| 209 | return | 209 | return |
| 210 | except xmlrpclib.Fault, x: | 210 | except xmlrpclib.Fault, x: |
| 211 | print "XMLRPC Fault getting commandline:\n %s" % x | 211 | print("XMLRPC Fault getting commandline:\n %s" % x) |
| 212 | return | 212 | return |
| 213 | 213 | ||
| 214 | shutdown = 0 | 214 | shutdown = 0 |
| @@ -233,8 +233,8 @@ def init(server, eventHandler): | |||
| 233 | x = event.sofar | 233 | x = event.sofar |
| 234 | y = event.total | 234 | y = event.total |
| 235 | if x == y: | 235 | if x == y: |
| 236 | print("\nParsing finished. %d cached, %d parsed, %d skipped, %d masked, %d errors." | 236 | print(("\nParsing finished. %d cached, %d parsed, %d skipped, %d masked, %d errors." |
| 237 | % ( event.cached, event.parsed, event.skipped, event.masked, event.errors)) | 237 | % ( event.cached, event.parsed, event.skipped, event.masked, event.errors))) |
| 238 | pbar.hide() | 238 | pbar.hide() |
| 239 | gtk.gdk.threads_enter() | 239 | gtk.gdk.threads_enter() |
| 240 | pbar.progress.set_fraction(float(x)/float(y)) | 240 | pbar.progress.set_fraction(float(x)/float(y)) |
| @@ -250,7 +250,7 @@ def init(server, eventHandler): | |||
| 250 | if isinstance(event, bb.command.CookerCommandCompleted): | 250 | if isinstance(event, bb.command.CookerCommandCompleted): |
| 251 | continue | 251 | continue |
| 252 | if isinstance(event, bb.command.CookerCommandFailed): | 252 | if isinstance(event, bb.command.CookerCommandFailed): |
| 253 | print "Command execution failed: %s" % event.error | 253 | print("Command execution failed: %s" % event.error) |
| 254 | break | 254 | break |
| 255 | if isinstance(event, bb.cooker.CookerExit): | 255 | if isinstance(event, bb.cooker.CookerExit): |
| 256 | break | 256 | break |
| @@ -259,13 +259,13 @@ def init(server, eventHandler): | |||
| 259 | 259 | ||
| 260 | except KeyboardInterrupt: | 260 | except KeyboardInterrupt: |
| 261 | if shutdown == 2: | 261 | if shutdown == 2: |
| 262 | print "\nThird Keyboard Interrupt, exit.\n" | 262 | print("\nThird Keyboard Interrupt, exit.\n") |
| 263 | break | 263 | break |
| 264 | if shutdown == 1: | 264 | if shutdown == 1: |
| 265 | print "\nSecond Keyboard Interrupt, stopping...\n" | 265 | print("\nSecond Keyboard Interrupt, stopping...\n") |
| 266 | server.runCommand(["stateStop"]) | 266 | server.runCommand(["stateStop"]) |
| 267 | if shutdown == 0: | 267 | if shutdown == 0: |
| 268 | print "\nKeyboard Interrupt, closing down...\n" | 268 | print("\nKeyboard Interrupt, closing down...\n") |
| 269 | server.runCommand(["stateShutdown"]) | 269 | server.runCommand(["stateShutdown"]) |
| 270 | shutdown = shutdown + 1 | 270 | shutdown = shutdown + 1 |
| 271 | pass | 271 | pass |
diff --git a/bitbake/lib/bb/ui/goggle.py b/bitbake/lib/bb/ui/goggle.py index bcba38be9c..7a3427f715 100644 --- a/bitbake/lib/bb/ui/goggle.py +++ b/bitbake/lib/bb/ui/goggle.py | |||
| @@ -55,15 +55,15 @@ def init (server, eventHandler): | |||
| 55 | window.cur_build_tv.set_model (running_build.model) | 55 | window.cur_build_tv.set_model (running_build.model) |
| 56 | try: | 56 | try: |
| 57 | cmdline = server.runCommand(["getCmdLineAction"]) | 57 | cmdline = server.runCommand(["getCmdLineAction"]) |
| 58 | print cmdline | 58 | print(cmdline) |
| 59 | if not cmdline: | 59 | if not cmdline: |
| 60 | return 1 | 60 | return 1 |
| 61 | ret = server.runCommand(cmdline) | 61 | ret = server.runCommand(cmdline) |
| 62 | if ret != True: | 62 | if ret != True: |
| 63 | print "Couldn't get default commandline! %s" % ret | 63 | print("Couldn't get default commandline! %s" % ret) |
| 64 | return 1 | 64 | return 1 |
| 65 | except xmlrpclib.Fault, x: | 65 | except xmlrpclib.Fault, x: |
| 66 | print "XMLRPC Fault getting commandline:\n %s" % x | 66 | print("XMLRPC Fault getting commandline:\n %s" % x) |
| 67 | return 1 | 67 | return 1 |
| 68 | 68 | ||
| 69 | # Use a timeout function for probing the event queue to find out if we | 69 | # Use a timeout function for probing the event queue to find out if we |
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 |
diff --git a/bitbake/lib/bb/ui/ncurses.py b/bitbake/lib/bb/ui/ncurses.py index 0eb1cf013b..89e67900b2 100644 --- a/bitbake/lib/bb/ui/ncurses.py +++ b/bitbake/lib/bb/ui/ncurses.py | |||
| @@ -232,10 +232,10 @@ class NCursesUI: | |||
| 232 | return | 232 | return |
| 233 | ret = server.runCommand(cmdline) | 233 | ret = server.runCommand(cmdline) |
| 234 | if ret != True: | 234 | if ret != True: |
| 235 | print "Couldn't get default commandlind! %s" % ret | 235 | print("Couldn't get default commandlind! %s" % ret) |
| 236 | return | 236 | return |
| 237 | except xmlrpclib.Fault, x: | 237 | except xmlrpclib.Fault, x: |
| 238 | print "XMLRPC Fault getting commandline:\n %s" % x | 238 | print("XMLRPC Fault getting commandline:\n %s" % x) |
| 239 | return | 239 | return |
| 240 | 240 | ||
| 241 | exitflag = False | 241 | exitflag = False |
| @@ -324,7 +324,7 @@ class NCursesUI: | |||
| 324 | 324 | ||
| 325 | def init(server, eventHandler): | 325 | def init(server, eventHandler): |
| 326 | if not os.isatty(sys.stdout.fileno()): | 326 | if not os.isatty(sys.stdout.fileno()): |
| 327 | print "FATAL: Unable to run 'ncurses' UI without a TTY." | 327 | print("FATAL: Unable to run 'ncurses' UI without a TTY.") |
| 328 | return | 328 | return |
| 329 | ui = NCursesUI() | 329 | ui = NCursesUI() |
| 330 | try: | 330 | try: |
diff --git a/bitbake/lib/bb/ui/puccho.py b/bitbake/lib/bb/ui/puccho.py index dfcb0f7651..7dffa5c3ba 100644 --- a/bitbake/lib/bb/ui/puccho.py +++ b/bitbake/lib/bb/ui/puccho.py | |||
| @@ -110,7 +110,7 @@ class MetaDataLoader(gobject.GObject): | |||
| 110 | except Exception, e: | 110 | except Exception, e: |
| 111 | gobject.idle_add (MetaDataLoader.emit_error_signal, self.loader, | 111 | gobject.idle_add (MetaDataLoader.emit_error_signal, self.loader, |
| 112 | "Unable to download repository metadata") | 112 | "Unable to download repository metadata") |
| 113 | print e | 113 | print(e) |
| 114 | 114 | ||
| 115 | def try_fetch_from_url (self, url): | 115 | def try_fetch_from_url (self, url): |
| 116 | # Try and download the metadata. Firing a signal if successful | 116 | # Try and download the metadata. Firing a signal if successful |
| @@ -326,8 +326,8 @@ class MainWindow (gtk.Window): | |||
| 326 | conf = None | 326 | conf = None |
| 327 | if (response_id == BuildSetupDialog.RESPONSE_BUILD): | 327 | if (response_id == BuildSetupDialog.RESPONSE_BUILD): |
| 328 | dialog.update_configuration() | 328 | dialog.update_configuration() |
| 329 | print dialog.configuration.machine, dialog.configuration.distro, \ | 329 | print(dialog.configuration.machine, dialog.configuration.distro, \ |
| 330 | dialog.configuration.image | 330 | dialog.configuration.image) |
| 331 | conf = dialog.configuration | 331 | conf = dialog.configuration |
| 332 | 332 | ||
| 333 | dialog.destroy() | 333 | dialog.destroy() |
| @@ -383,11 +383,11 @@ def running_build_succeeded_cb (running_build, manager): | |||
| 383 | # BuildManager. It can then hook onto the signals directly and drive | 383 | # BuildManager. It can then hook onto the signals directly and drive |
| 384 | # interesting things it cares about. | 384 | # interesting things it cares about. |
| 385 | manager.notify_build_succeeded () | 385 | manager.notify_build_succeeded () |
| 386 | print "build succeeded" | 386 | print("build succeeded") |
| 387 | 387 | ||
| 388 | def running_build_failed_cb (running_build, manager): | 388 | def running_build_failed_cb (running_build, manager): |
| 389 | # As above | 389 | # As above |
| 390 | print "build failed" | 390 | print("build failed") |
| 391 | manager.notify_build_failed () | 391 | manager.notify_build_failed () |
| 392 | 392 | ||
| 393 | def init (server, eventHandler): | 393 | def init (server, eventHandler): |
