diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-12 08:30:35 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-16 23:32:40 +0100 |
| commit | bc8971d122a02ed823acf0758da267dccc584f98 (patch) | |
| tree | dd97329507feb611e64fad7f46d97d657f23eae4 /bitbake/lib/bb/ui/crumbs | |
| parent | e2f4d9f1ec694768b223decb59a9c768a2da962d (diff) | |
| download | poky-bc8971d122a02ed823acf0758da267dccc584f98.tar.gz | |
bitbake: bitbake: Convert to python 3 megacommit This needs breaking up into smaller changes.
(Bitbake rev: cf51f19aed208a75d38c14cd585d9b9f115e3ba3)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs')
| -rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobwidget.py | 2 | ||||
| -rw-r--r-- | bitbake/lib/bb/ui/crumbs/progressbar.py | 6 | ||||
| -rw-r--r-- | bitbake/lib/bb/ui/crumbs/runningbuild.py | 12 |
3 files changed, 10 insertions, 10 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobwidget.py b/bitbake/lib/bb/ui/crumbs/hobwidget.py index 2b969c146e..1f51a3cf7f 100644 --- a/bitbake/lib/bb/ui/crumbs/hobwidget.py +++ b/bitbake/lib/bb/ui/crumbs/hobwidget.py | |||
| @@ -612,7 +612,7 @@ class HobIconChecker(hic): | |||
| 612 | def set_hob_icon_to_stock_icon(self, file_path, stock_id=""): | 612 | def set_hob_icon_to_stock_icon(self, file_path, stock_id=""): |
| 613 | try: | 613 | try: |
| 614 | pixbuf = gtk.gdk.pixbuf_new_from_file(file_path) | 614 | pixbuf = gtk.gdk.pixbuf_new_from_file(file_path) |
| 615 | except Exception, e: | 615 | except Exception as e: |
| 616 | return None | 616 | return None |
| 617 | 617 | ||
| 618 | if stock_id and (gtk.icon_factory_lookup_default(stock_id) == None): | 618 | if stock_id and (gtk.icon_factory_lookup_default(stock_id) == None): |
diff --git a/bitbake/lib/bb/ui/crumbs/progressbar.py b/bitbake/lib/bb/ui/crumbs/progressbar.py index 3e2c660e4a..03230ae8a9 100644 --- a/bitbake/lib/bb/ui/crumbs/progressbar.py +++ b/bitbake/lib/bb/ui/crumbs/progressbar.py | |||
| @@ -44,9 +44,9 @@ class HobProgressBar (gtk.ProgressBar): | |||
| 44 | self.set_text(text) | 44 | self.set_text(text) |
| 45 | 45 | ||
| 46 | def set_stop_title(self, text=None): | 46 | def set_stop_title(self, text=None): |
| 47 | if not text: | 47 | if not text: |
| 48 | text = "" | 48 | text = "" |
| 49 | self.set_text(text) | 49 | self.set_text(text) |
| 50 | 50 | ||
| 51 | def reset(self): | 51 | def reset(self): |
| 52 | self.set_fraction(0) | 52 | self.set_fraction(0) |
diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py index 16a955d2b1..9b695ac2ed 100644 --- a/bitbake/lib/bb/ui/crumbs/runningbuild.py +++ b/bitbake/lib/bb/ui/crumbs/runningbuild.py | |||
| @@ -23,14 +23,14 @@ import gtk | |||
| 23 | import gobject | 23 | import gobject |
| 24 | import logging | 24 | import logging |
| 25 | import time | 25 | import time |
| 26 | import urllib | 26 | import urllib.request, urllib.parse, urllib.error |
| 27 | import urllib2 | 27 | import urllib.request, urllib.error, urllib.parse |
| 28 | import pango | 28 | import pango |
| 29 | from bb.ui.crumbs.hobcolor import HobColors | 29 | from bb.ui.crumbs.hobcolor import HobColors |
| 30 | from bb.ui.crumbs.hobwidget import HobWarpCellRendererText, HobCellRendererPixbuf | 30 | from bb.ui.crumbs.hobwidget import HobWarpCellRendererText, HobCellRendererPixbuf |
| 31 | 31 | ||
| 32 | class RunningBuildModel (gtk.TreeStore): | 32 | class RunningBuildModel (gtk.TreeStore): |
| 33 | (COL_LOG, COL_PACKAGE, COL_TASK, COL_MESSAGE, COL_ICON, COL_COLOR, COL_NUM_ACTIVE) = range(7) | 33 | (COL_LOG, COL_PACKAGE, COL_TASK, COL_MESSAGE, COL_ICON, COL_COLOR, COL_NUM_ACTIVE) = list(range(7)) |
| 34 | 34 | ||
| 35 | def __init__ (self): | 35 | def __init__ (self): |
| 36 | gtk.TreeStore.__init__ (self, | 36 | gtk.TreeStore.__init__ (self, |
| @@ -443,8 +443,8 @@ def do_pastebin(text): | |||
| 443 | url = 'http://pastebin.com/api_public.php' | 443 | url = 'http://pastebin.com/api_public.php' |
| 444 | params = {'paste_code': text, 'paste_format': 'text'} | 444 | params = {'paste_code': text, 'paste_format': 'text'} |
| 445 | 445 | ||
| 446 | req = urllib2.Request(url, urllib.urlencode(params)) | 446 | req = urllib.request.Request(url, urllib.parse.urlencode(params)) |
| 447 | response = urllib2.urlopen(req) | 447 | response = urllib.request.urlopen(req) |
| 448 | paste_url = response.read() | 448 | paste_url = response.read() |
| 449 | 449 | ||
| 450 | return paste_url | 450 | return paste_url |
| @@ -519,7 +519,7 @@ class RunningBuildTreeView (gtk.TreeView): | |||
| 519 | 519 | ||
| 520 | # @todo Provide visual feedback to the user that it is done and that | 520 | # @todo Provide visual feedback to the user that it is done and that |
| 521 | # it worked. | 521 | # it worked. |
| 522 | print paste_url | 522 | print(paste_url) |
| 523 | 523 | ||
| 524 | self._add_to_clipboard(paste_url) | 524 | self._add_to_clipboard(paste_url) |
| 525 | 525 | ||
