summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/ui
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-04-09 19:46:14 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-02 15:41:33 +0100
commitad543e2e41b7e86d83cf0518b096ef82627bf891 (patch)
treef8f3c5d4f759f3169a937db1da6858a11aa938fa /bitbake/lib/bb/ui
parent978b5c946683885a64ee9e7c2064ff696f05cddb (diff)
downloadopenembedded-core-ad543e2e41b7e86d83cf0518b096ef82627bf891.tar.gz
openembedded-core-ad543e2e41b7e86d83cf0518b096ef82627bf891.tar.bz2
openembedded-core-ad543e2e41b7e86d83cf0518b096ef82627bf891.zip
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.py4
-rw-r--r--bitbake/lib/bb/ui/depexp.py18
-rw-r--r--bitbake/lib/bb/ui/goggle.py6
-rw-r--r--bitbake/lib/bb/ui/knotty.py44
-rw-r--r--bitbake/lib/bb/ui/ncurses.py6
-rw-r--r--bitbake/lib/bb/ui/puccho.py10
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):
# pull it out.
# TODO: Better to stat a file?
(_ , date, revision) = identifier.split ("-")
- print date
+ print(date)
year = int (date[0:4])
month = int (date[4:6])
@@ -386,7 +386,7 @@ class BuildManager (gobject.GObject):
server.runCommand(["buildTargets", [conf.image], "rootfs"])
except Exception, e:
- print e
+ print(e)
class BuildManagerTreeView (gtk.TreeView):
""" 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):
try:
cmdline = server.runCommand(["getCmdLineAction"])
if not cmdline or cmdline[0] != "generateDotGraph":
- print "This UI is only compatible with the -g option"
+ print("This UI is only compatible with the -g option")
return
ret = server.runCommand(["generateDepTreeEvent", cmdline[1], cmdline[2]])
if ret != True:
- print "Couldn't run command! %s" % ret
+ print("Couldn't run command! %s" % ret)
return
except xmlrpclib.Fault, x:
- print "XMLRPC Fault getting commandline:\n %s" % x
+ print("XMLRPC Fault getting commandline:\n %s" % x)
return
shutdown = 0
@@ -233,8 +233,8 @@ def init(server, eventHandler):
x = event.sofar
y = event.total
if x == y:
- print("\nParsing finished. %d cached, %d parsed, %d skipped, %d masked, %d errors."
- % ( event.cached, event.parsed, event.skipped, event.masked, event.errors))
+ print(("\nParsing finished. %d cached, %d parsed, %d skipped, %d masked, %d errors."
+ % ( event.cached, event.parsed, event.skipped, event.masked, event.errors)))
pbar.hide()
gtk.gdk.threads_enter()
pbar.progress.set_fraction(float(x)/float(y))
@@ -250,7 +250,7 @@ def init(server, eventHandler):
if isinstance(event, bb.command.CookerCommandCompleted):
continue
if isinstance(event, bb.command.CookerCommandFailed):
- print "Command execution failed: %s" % event.error
+ print("Command execution failed: %s" % event.error)
break
if isinstance(event, bb.cooker.CookerExit):
break
@@ -259,13 +259,13 @@ def init(server, eventHandler):
except KeyboardInterrupt:
if shutdown == 2:
- print "\nThird Keyboard Interrupt, exit.\n"
+ print("\nThird Keyboard Interrupt, exit.\n")
break
if shutdown == 1:
- print "\nSecond Keyboard Interrupt, stopping...\n"
+ print("\nSecond Keyboard Interrupt, stopping...\n")
server.runCommand(["stateStop"])
if shutdown == 0:
- print "\nKeyboard Interrupt, closing down...\n"
+ print("\nKeyboard Interrupt, closing down...\n")
server.runCommand(["stateShutdown"])
shutdown = shutdown + 1
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):
window.cur_build_tv.set_model (running_build.model)
try:
cmdline = server.runCommand(["getCmdLineAction"])
- print cmdline
+ print(cmdline)
if not cmdline:
return 1
ret = server.runCommand(cmdline)
if ret != True:
- print "Couldn't get default commandline! %s" % ret
+ print("Couldn't get default commandline! %s" % ret)
return 1
except xmlrpclib.Fault, x:
- print "XMLRPC Fault getting commandline:\n %s" % x
+ print("XMLRPC Fault getting commandline:\n %s" % x)
return 1
# 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):
return 1
ret = server.runCommand(cmdline)
if ret != True:
- print "Couldn't get default commandline! %s" % ret
+ print("Couldn't get default commandline! %s" % ret)
return 1
except xmlrpclib.Fault, x:
- print "XMLRPC Fault getting commandline:\n %s" % x
+ print("XMLRPC Fault getting commandline:\n %s" % x)
return 1
shutdown = 0
@@ -65,39 +65,39 @@ def init(server, eventHandler):
if shutdown and helper.needUpdate:
activetasks, failedtasks = helper.getTasks()
if activetasks:
- print "Waiting for %s active tasks to finish:" % len(activetasks)
+ print("Waiting for %s active tasks to finish:" % len(activetasks))
tasknum = 1
for task in activetasks:
- print "%s: %s (pid %s)" % (tasknum, activetasks[task]["title"], task)
+ print("%s: %s (pid %s)" % (tasknum, activetasks[task]["title"], task))
tasknum = tasknum + 1
if isinstance(event, bb.msg.MsgPlain):
- print event._message
+ print(event._message)
continue
if isinstance(event, bb.msg.MsgDebug):
- print 'DEBUG: ' + event._message
+ print('DEBUG: ' + event._message)
continue
if isinstance(event, bb.msg.MsgNote):
- print 'NOTE: ' + event._message
+ print('NOTE: ' + event._message)
continue
if isinstance(event, bb.msg.MsgWarn):
- print 'WARNING: ' + event._message
+ print('WARNING: ' + event._message)
continue
if isinstance(event, bb.msg.MsgError):
return_value = 1
- print 'ERROR: ' + event._message
+ print('ERROR: ' + event._message)
continue
if isinstance(event, bb.msg.MsgFatal):
return_value = 1
- print 'FATAL: ' + event._message
+ print('FATAL: ' + event._message)
break
if isinstance(event, bb.build.TaskFailed):
return_value = 1
logfile = event.logfile
if logfile:
- print "ERROR: Logfile of failure stored in: %s" % logfile
+ print("ERROR: Logfile of failure stored in: %s" % logfile)
if 1 or includelogs:
- print "Log data follows:"
+ print("Log data follows:")
f = open(logfile, "r")
lines = []
while True:
@@ -110,13 +110,13 @@ def init(server, eventHandler):
if len(lines) > int(loglines):
lines.pop(0)
else:
- print '| %s' % l
+ print('| %s' % l)
f.close()
if lines:
for line in lines:
- print line
+ print(line)
if isinstance(event, bb.build.TaskBase):
- print "NOTE: %s" % event._message
+ print("NOTE: %s" % event._message)
continue
if isinstance(event, bb.event.ParseProgress):
x = event.sofar
@@ -132,8 +132,8 @@ def init(server, eventHandler):
sys.stdout.write("done.")
sys.stdout.flush()
if x == y:
- print("\nParsing of %d .bb files complete (%d cached, %d parsed). %d targets, %d skipped, %d masked, %d errors."
- % ( event.total, event.cached, event.parsed, event.virtuals, event.skipped, event.masked, event.errors))
+ print(("\nParsing of %d .bb files complete (%d cached, %d parsed). %d targets, %d skipped, %d masked, %d errors."
+ % ( event.total, event.cached, event.parsed, event.virtuals, event.skipped, event.masked, event.errors)))
continue
if isinstance(event, bb.command.CookerCommandCompleted):
@@ -143,7 +143,7 @@ def init(server, eventHandler):
continue
if isinstance(event, bb.command.CookerCommandFailed):
return_value = 1
- print "Command execution failed: %s" % event.error
+ print("Command execution failed: %s" % event.error)
break
if isinstance(event, bb.cooker.CookerExit):
break
@@ -165,17 +165,17 @@ def init(server, eventHandler):
continue
if isinstance(event, bb.event.RecipeParsed):
continue
- print "Unknown Event: %s" % event
+ print("Unknown Event: %s" % event)
except KeyboardInterrupt:
if shutdown == 2:
- print "\nThird Keyboard Interrupt, exit.\n"
+ print("\nThird Keyboard Interrupt, exit.\n")
break
if shutdown == 1:
- print "\nSecond Keyboard Interrupt, stopping...\n"
+ print("\nSecond Keyboard Interrupt, stopping...\n")
server.runCommand(["stateStop"])
if shutdown == 0:
- print "\nKeyboard Interrupt, closing down...\n"
+ print("\nKeyboard Interrupt, closing down...\n")
server.runCommand(["stateShutdown"])
shutdown = shutdown + 1
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:
return
ret = server.runCommand(cmdline)
if ret != True:
- print "Couldn't get default commandlind! %s" % ret
+ print("Couldn't get default commandlind! %s" % ret)
return
except xmlrpclib.Fault, x:
- print "XMLRPC Fault getting commandline:\n %s" % x
+ print("XMLRPC Fault getting commandline:\n %s" % x)
return
exitflag = False
@@ -324,7 +324,7 @@ class NCursesUI:
def init(server, eventHandler):
if not os.isatty(sys.stdout.fileno()):
- print "FATAL: Unable to run 'ncurses' UI without a TTY."
+ print("FATAL: Unable to run 'ncurses' UI without a TTY.")
return
ui = NCursesUI()
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):
except Exception, e:
gobject.idle_add (MetaDataLoader.emit_error_signal, self.loader,
"Unable to download repository metadata")
- print e
+ print(e)
def try_fetch_from_url (self, url):
# Try and download the metadata. Firing a signal if successful
@@ -326,8 +326,8 @@ class MainWindow (gtk.Window):
conf = None
if (response_id == BuildSetupDialog.RESPONSE_BUILD):
dialog.update_configuration()
- print dialog.configuration.machine, dialog.configuration.distro, \
- dialog.configuration.image
+ print(dialog.configuration.machine, dialog.configuration.distro, \
+ dialog.configuration.image)
conf = dialog.configuration
dialog.destroy()
@@ -383,11 +383,11 @@ def running_build_succeeded_cb (running_build, manager):
# BuildManager. It can then hook onto the signals directly and drive
# interesting things it cares about.
manager.notify_build_succeeded ()
- print "build succeeded"
+ print("build succeeded")
def running_build_failed_cb (running_build, manager):
# As above
- print "build failed"
+ print("build failed")
manager.notify_build_failed ()
def init (server, eventHandler):