diff options
-rw-r--r-- | portato/backend/package.py | 7 | ||||
-rw-r--r-- | portato/backend/portage/package.py | 2 | ||||
-rw-r--r-- | portato/gui/windows/main.py | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/portato/backend/package.py b/portato/backend/package.py index 1e17b1f..16148d2 100644 --- a/portato/backend/package.py +++ b/portato/backend/package.py @@ -165,9 +165,8 @@ class Package (_Package): p = self.get_ebuild_path() sp = p.split("/") - if len(sp): - import string - return string.join(sp[:-1],"/") + if sp: + return "/".join(sp[:-1]) def get_dependencies (self): """ @@ -243,7 +242,7 @@ class Package (_Package): raise NotImplementedError - def is_overlay(self): + def is_in_overlay(self): """Returns true if the package is in an overlay. @rtype: boolean""" diff --git a/portato/backend/portage/package.py b/portato/backend/portage/package.py index dc3cde3..5f1fa74 100644 --- a/portato/backend/portage/package.py +++ b/portato/backend/portage/package.py @@ -88,7 +88,7 @@ class PortagePackage (Package): def is_installed(self): return self._settings.vartree.dbapi.cpv_exists(self._cpv) - def is_overlay(self): + def is_in_overlay(self): dir,ovl = self._settings.porttree.dbapi.findname2(self._cpv) return ovl != self._settings.settings["PORTDIR"] and str(ovl) != "0" diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py index 99739ae..1962e12 100644 --- a/portato/gui/windows/main.py +++ b/portato/gui/windows/main.py @@ -173,7 +173,7 @@ class PackageTable: self.descLabel.set_label(desc) # overlay - if pkg.is_overlay(): + if pkg.is_in_overlay(): self.overlayLabel.set_label(pkg.get_overlay_path()) self.overlayLabel.show() self.overlayLL.show() |