diff options
Diffstat (limited to 'bitbake/lib/bb/ui')
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/builddetailspage.py | 5 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hig.py | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builddetailspage.py b/bitbake/lib/bb/ui/crumbs/builddetailspage.py index 0052b017e5..0741a7ba73 100755 --- a/bitbake/lib/bb/ui/crumbs/builddetailspage.py +++ b/bitbake/lib/bb/ui/crumbs/builddetailspage.py | |||
@@ -23,6 +23,7 @@ | |||
23 | import gtk | 23 | import gtk |
24 | import pango | 24 | import pango |
25 | import gobject | 25 | import gobject |
26 | import bb.process | ||
26 | from bb.ui.crumbs.progressbar import HobProgressBar | 27 | from bb.ui.crumbs.progressbar import HobProgressBar |
27 | from bb.ui.crumbs.hobwidget import hic, HobNotebook, HobAltButton, HobWarpCellRendererText, HobButton | 28 | from bb.ui.crumbs.hobwidget import hic, HobNotebook, HobAltButton, HobWarpCellRendererText, HobButton |
28 | from bb.ui.crumbs.runningbuild import RunningBuildTreeView | 29 | from bb.ui.crumbs.runningbuild import RunningBuildTreeView |
@@ -97,9 +98,9 @@ class BuildConfigurationTreeView(gtk.TreeView): | |||
97 | for path in src_config_info.layers: | 98 | for path in src_config_info.layers: |
98 | import os, os.path | 99 | import os, os.path |
99 | if os.path.exists(path): | 100 | if os.path.exists(path): |
100 | f = os.popen('cd %s; git branch 2>&1 | grep "^* " | tr -d "* "' % path) | 101 | f, errors = bb.process.run('cd %s; git branch 2>&1 | grep "^* " | tr -d "* "' % path) |
101 | if f: | 102 | if f: |
102 | branch = f.readline().lstrip('\n').rstrip('\n') | 103 | branch = f.strip('\n') |
103 | vars.append(self.set_vars("Branch:", branch)) | 104 | vars.append(self.set_vars("Branch:", branch)) |
104 | f.close() | 105 | f.close() |
105 | break | 106 | break |
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py index 1bc155d008..38f890b9f1 100644 --- a/bitbake/lib/bb/ui/crumbs/hig.py +++ b/bitbake/lib/bb/ui/crumbs/hig.py | |||
@@ -25,12 +25,12 @@ import gobject | |||
25 | import hashlib | 25 | import hashlib |
26 | import os | 26 | import os |
27 | import re | 27 | import re |
28 | import subprocess | ||
29 | import shlex | 28 | import shlex |
30 | from bb.ui.crumbs.hobcolor import HobColors | 29 | from bb.ui.crumbs.hobcolor import HobColors |
31 | from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobButton, HobAltButton, HobIconChecker | 30 | from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobButton, HobAltButton, HobIconChecker |
32 | from bb.ui.crumbs.progressbar import HobProgressBar | 31 | from bb.ui.crumbs.progressbar import HobProgressBar |
33 | import bb.ui.crumbs.utils | 32 | import bb.ui.crumbs.utils |
33 | import bb.process | ||
34 | 34 | ||
35 | """ | 35 | """ |
36 | The following are convenience classes for implementing GNOME HIG compliant | 36 | The following are convenience classes for implementing GNOME HIG compliant |
@@ -799,7 +799,8 @@ class DeployImageDialog (CrumbsDialog): | |||
799 | self.progress_bar.hide() | 799 | self.progress_bar.hide() |
800 | 800 | ||
801 | def popen_read(self, cmd): | 801 | def popen_read(self, cmd): |
802 | return os.popen("%s 2>/dev/null" % cmd).read().strip() | 802 | tmpout, errors = bb.process.run("%s" % cmd) |
803 | return tmpout.strip() | ||
803 | 804 | ||
804 | def find_all_usb_devices(self): | 805 | def find_all_usb_devices(self): |
805 | usb_devs = [ os.readlink(u) | 806 | usb_devs = [ os.readlink(u) |
@@ -828,7 +829,7 @@ class DeployImageDialog (CrumbsDialog): | |||
828 | cmdline = bb.ui.crumbs.utils.which_terminal() | 829 | cmdline = bb.ui.crumbs.utils.which_terminal() |
829 | if cmdline: | 830 | if cmdline: |
830 | cmdline += "\"sudo dd if=" + self.image_path + " of=" + combo_item + "\"" | 831 | cmdline += "\"sudo dd if=" + self.image_path + " of=" + combo_item + "\"" |
831 | subprocess.Popen(args=shlex.split(cmdline)) | 832 | bb.process.run(shlex.split(cmdline)) |
832 | 833 | ||
833 | def update_progress_bar(self, title, fraction, status=None): | 834 | def update_progress_bar(self, title, fraction, status=None): |
834 | self.progress_bar.update(fraction) | 835 | self.progress_bar.update(fraction) |