aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Ochotnicky <sochotnicky@gmail.com>2009-08-12 09:19:06 +0200
committerStanislav Ochotnicky <sochotnicky@gmail.com>2009-08-12 19:28:39 +0200
commit785966e480420aa613b6e102c44171cb2acfcbed (patch)
tree08c022dc4205eb211f8bcee54bc45353eab101f1
parentChanged urls of attachments to preserve name (diff)
downloadcollagen-785966e480420aa613b6e102c44171cb2acfcbed.tar.gz
collagen-785966e480420aa613b6e102c44171cb2acfcbed.tar.bz2
collagen-785966e480420aa613b6e102c44171cb2acfcbed.zip
Fix imports/code for portage 2.2
-rw-r--r--src/tinderbox/__init__.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/tinderbox/__init__.py b/src/tinderbox/__init__.py
index c9cb79f..39fb9e6 100644
--- a/src/tinderbox/__init__.py
+++ b/src/tinderbox/__init__.py
@@ -10,10 +10,14 @@ from subprocess import CalledProcessError
import re
import string
from string import atoi
-import portage
-import portage._sets as psets
from traceback import print_exc, format_exc
+import portage
+try:
+ import portage._sets as psets
+except ImportError:
+ import portage.sets as psets
+
from util import WritableObject, flatten_deps
from common.exceptions import ChrootPreparationException
@@ -36,7 +40,7 @@ class Tinderbox(object):
self.trees = portage.create_trees()
self.settings["PORTAGE_VERBOSE"]="1"
self.settings.backup_changes("PORTAGE_VERBOSE")
- self.setconf = psets.SetConfig(None, self.settings, self.trees)
+ self.setconf = psets.SetConfig([], self.settings, self.trees)
init_logging('/tmp')