aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMerlijn Wajer <merlijn@wizzup.org>2014-02-22 11:22:19 -0800
committerBrian Dolbec <dolsen@gentoo.org>2014-02-22 11:22:19 -0800
commit29de73337a703bcfe706d8b7df35c92781854ad5 (patch)
tree43d20c8d19e17810c5941ba1953890e8cc21713a
parentrevdep_rebuild/rebuild.py: Migrate an os.system() call to subprocess.call() (diff)
downloadgentoolkit-29de73337a703bcfe706d8b7df35c92781854ad5.tar.gz
gentoolkit-29de73337a703bcfe706d8b7df35c92781854ad5.tar.bz2
gentoolkit-29de73337a703bcfe706d8b7df35c92781854ad5.zip
Fix the broken import statement for sets.
This udates gentoolkit for the renamed sets module to _sets.
-rw-r--r--pym/gentoolkit/sets.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/pym/gentoolkit/sets.py b/pym/gentoolkit/sets.py
index b9c3601..70315e9 100644
--- a/pym/gentoolkit/sets.py
+++ b/pym/gentoolkit/sets.py
@@ -10,9 +10,11 @@ __docformat__ = 'epytext'
import portage
try:
- import portage.sets
+ # Per commit 25d8427b3b29cbcee97279186983dae818495f8f in portage,
+ # portage.sets is renamed to portage._sets.
+ import portage._sets
_sets_available = True
- SETPREFIX = portage.sets.SETPREFIX
+ SETPREFIX = portage._sets.SETPREFIX
except ImportError:
_sets_available = False
SETPREFIX = "@"
@@ -25,7 +27,7 @@ _set_config = None
def _init_set_config():
global _set_config
if _set_config is None:
- _set_config = portage.sets.load_default_config(
+ _set_config = portage._sets.load_default_config(
portage.settings, portage.db[portage.root])
def get_available_sets():
@@ -50,7 +52,7 @@ def get_set_atoms(setname):
try:
return set([Atom(str(x))
for x in _set_config.getSetAtoms(setname)])
- except portage.sets.PackageSetNotFound:
+ except portage._sets.PackageSetNotFound:
raise errors.GentoolkitSetNotFound(setname)
raise errors.GentoolkitSetNotFound(setname)