diff options
Diffstat (limited to 'lib/bb/ui/crumbs')
-rw-r--r-- | lib/bb/ui/crumbs/hobwidget.py | 2 | ||||
-rw-r--r-- | lib/bb/ui/crumbs/progressbar.py | 6 | ||||
-rw-r--r-- | lib/bb/ui/crumbs/runningbuild.py | 12 |
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/bb/ui/crumbs/hobwidget.py b/lib/bb/ui/crumbs/hobwidget.py index 2b969c146..1f51a3cf7 100644 --- a/lib/bb/ui/crumbs/hobwidget.py +++ b/lib/bb/ui/crumbs/hobwidget.py @@ -612,7 +612,7 @@ class HobIconChecker(hic): def set_hob_icon_to_stock_icon(self, file_path, stock_id=""): try: pixbuf = gtk.gdk.pixbuf_new_from_file(file_path) - except Exception, e: + except Exception as e: return None if stock_id and (gtk.icon_factory_lookup_default(stock_id) == None): diff --git a/lib/bb/ui/crumbs/progressbar.py b/lib/bb/ui/crumbs/progressbar.py index 3e2c660e4..03230ae8a 100644 --- a/lib/bb/ui/crumbs/progressbar.py +++ b/lib/bb/ui/crumbs/progressbar.py @@ -44,9 +44,9 @@ class HobProgressBar (gtk.ProgressBar): self.set_text(text) def set_stop_title(self, text=None): - if not text: - text = "" - self.set_text(text) + if not text: + text = "" + self.set_text(text) def reset(self): self.set_fraction(0) diff --git a/lib/bb/ui/crumbs/runningbuild.py b/lib/bb/ui/crumbs/runningbuild.py index 16a955d2b..9b695ac2e 100644 --- a/lib/bb/ui/crumbs/runningbuild.py +++ b/lib/bb/ui/crumbs/runningbuild.py @@ -23,14 +23,14 @@ import gtk import gobject import logging import time -import urllib -import urllib2 +import urllib.request, urllib.parse, urllib.error +import urllib.request, urllib.error, urllib.parse import pango from bb.ui.crumbs.hobcolor import HobColors from bb.ui.crumbs.hobwidget import HobWarpCellRendererText, HobCellRendererPixbuf class RunningBuildModel (gtk.TreeStore): - (COL_LOG, COL_PACKAGE, COL_TASK, COL_MESSAGE, COL_ICON, COL_COLOR, COL_NUM_ACTIVE) = range(7) + (COL_LOG, COL_PACKAGE, COL_TASK, COL_MESSAGE, COL_ICON, COL_COLOR, COL_NUM_ACTIVE) = list(range(7)) def __init__ (self): gtk.TreeStore.__init__ (self, @@ -443,8 +443,8 @@ def do_pastebin(text): url = 'http://pastebin.com/api_public.php' params = {'paste_code': text, 'paste_format': 'text'} - req = urllib2.Request(url, urllib.urlencode(params)) - response = urllib2.urlopen(req) + req = urllib.request.Request(url, urllib.parse.urlencode(params)) + response = urllib.request.urlopen(req) paste_url = response.read() return paste_url @@ -519,7 +519,7 @@ class RunningBuildTreeView (gtk.TreeView): # @todo Provide visual feedback to the user that it is done and that # it worked. - print paste_url + print(paste_url) self._add_to_clipboard(paste_url) |