diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-04-11 17:03:55 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-07-02 15:41:33 +0100 |
commit | 1180bab54e2879401f3586c91a48174191a1ee8b (patch) | |
tree | a45aeee20eb5969cc1ac778fac47134929f4e021 /bitbake/lib/bb/ui | |
parent | 5b216c8000dbc3ed9f3e996242eb24269fcaf919 (diff) | |
download | ast2050-yocto-poky-1180bab54e2879401f3586c91a48174191a1ee8b.zip ast2050-yocto-poky-1180bab54e2879401f3586c91a48174191a1ee8b.tar.gz |
Apply some 2to3 transforms that don't cause issues in 2.6
(Bitbake rev: d39ab776e7ceaefc8361150151cf0892dcb70d9c)
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/crumbs/runningbuild.py | 6 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/depexp.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/goggle.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/knotty.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/ncurses.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/puccho.py | 6 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/uievent.py | 2 |
8 files changed, 13 insertions, 13 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/buildmanager.py b/bitbake/lib/bb/ui/crumbs/buildmanager.py index 37a62f1..b5a4dae 100644 --- a/bitbake/lib/bb/ui/crumbs/buildmanager.py +++ b/bitbake/lib/bb/ui/crumbs/buildmanager.py @@ -157,7 +157,7 @@ class BuildResult(gobject.GObject): # format build-<year><month><day>-<ordinal> we can easily # pull it out. # TODO: Better to stat a file? - (_ , date, revision) = identifier.split ("-") + (_, date, revision) = identifier.split ("-") print(date) year = int (date[0:4]) @@ -385,7 +385,7 @@ class BuildManager (gobject.GObject): build_directory]) server.runCommand(["buildTargets", [conf.image], "rootfs"]) - except Exception, e: + except Exception as e: print(e) class BuildManagerTreeView (gtk.TreeView): diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py index 79e2c90..b4416ec 100644 --- a/bitbake/lib/bb/ui/crumbs/runningbuild.py +++ b/bitbake/lib/bb/ui/crumbs/runningbuild.py @@ -63,7 +63,7 @@ class RunningBuild (gobject.GObject): # for the message. if hasattr(event, 'pid'): pid = event.pid - if self.pids_to_task.has_key(pid): + if pid in self.pids_to_task: (package, task) = self.pids_to_task[pid] parent = self.tasks_to_iter[(package, task)] @@ -93,12 +93,12 @@ class RunningBuild (gobject.GObject): (package, task) = (event._package, event._task) # Save out this PID. - self.pids_to_task[pid] = (package,task) + self.pids_to_task[pid] = (package, task) # Check if we already have this package in our model. If so then # that can be the parent for the task. Otherwise we create a new # top level for the package. - if (self.tasks_to_iter.has_key ((package, None))): + if ((package, None) in self.tasks_to_iter): parent = self.tasks_to_iter[(package, None)] else: parent = self.model.append (None, (None, diff --git a/bitbake/lib/bb/ui/depexp.py b/bitbake/lib/bb/ui/depexp.py index e386e34..1cd58ca 100644 --- a/bitbake/lib/bb/ui/depexp.py +++ b/bitbake/lib/bb/ui/depexp.py @@ -207,7 +207,7 @@ def init(server, eventHandler): if ret != True: print("Couldn't run command! %s" % ret) return - except xmlrpclib.Fault, x: + except xmlrpclib.Fault as x: print("XMLRPC Fault getting commandline:\n %s" % x) return diff --git a/bitbake/lib/bb/ui/goggle.py b/bitbake/lib/bb/ui/goggle.py index 7a3427f..2cfa002 100644 --- a/bitbake/lib/bb/ui/goggle.py +++ b/bitbake/lib/bb/ui/goggle.py @@ -62,7 +62,7 @@ def init (server, eventHandler): if ret != True: print("Couldn't get default commandline! %s" % ret) return 1 - except xmlrpclib.Fault, x: + except xmlrpclib.Fault as x: print("XMLRPC Fault getting commandline:\n %s" % x) return 1 diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index dba9530..b6ca15b 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py @@ -46,7 +46,7 @@ def init(server, eventHandler): if ret != True: print("Couldn't get default commandline! %s" % ret) return 1 - except xmlrpclib.Fault, x: + except xmlrpclib.Fault as x: print("XMLRPC Fault getting commandline:\n %s" % x) return 1 diff --git a/bitbake/lib/bb/ui/ncurses.py b/bitbake/lib/bb/ui/ncurses.py index 89e6790..e3bca2a 100644 --- a/bitbake/lib/bb/ui/ncurses.py +++ b/bitbake/lib/bb/ui/ncurses.py @@ -234,7 +234,7 @@ class NCursesUI: if ret != True: print("Couldn't get default commandlind! %s" % ret) return - except xmlrpclib.Fault, x: + except xmlrpclib.Fault as x: print("XMLRPC Fault getting commandline:\n %s" % x) return diff --git a/bitbake/lib/bb/ui/puccho.py b/bitbake/lib/bb/ui/puccho.py index 7dffa5c..2ac0253 100644 --- a/bitbake/lib/bb/ui/puccho.py +++ b/bitbake/lib/bb/ui/puccho.py @@ -104,10 +104,10 @@ class MetaDataLoader(gobject.GObject): gobject.idle_add (MetaDataLoader.emit_success_signal, self.loader) - except MetaDataLoader.LoaderThread.LoaderImportException, e: + except MetaDataLoader.LoaderThread.LoaderImportException as e: gobject.idle_add (MetaDataLoader.emit_error_signal, self.loader, "Repository metadata corrupt") - except Exception, e: + except Exception as e: gobject.idle_add (MetaDataLoader.emit_error_signal, self.loader, "Unable to download repository metadata") print(e) @@ -211,7 +211,7 @@ class BuildSetupDialog (gtk.Dialog): # Build button = gtk.Button ("_Build", None, True) image = gtk.Image () - image.set_from_stock (gtk.STOCK_EXECUTE,gtk.ICON_SIZE_BUTTON) + image.set_from_stock (gtk.STOCK_EXECUTE, gtk.ICON_SIZE_BUTTON) button.set_image (image) self.add_action_widget (button, BuildSetupDialog.RESPONSE_BUILD) button.show_all () diff --git a/bitbake/lib/bb/ui/uievent.py b/bitbake/lib/bb/ui/uievent.py index 5b3efff..f1e4d79 100644 --- a/bitbake/lib/bb/ui/uievent.py +++ b/bitbake/lib/bb/ui/uievent.py @@ -110,7 +110,7 @@ class UIXMLRPCServer (SimpleXMLRPCServer): return (sock, addr) except socket.timeout: pass - return (None,None) + return (None, None) def close_request(self, request): if request is None: |