From 785966e480420aa613b6e102c44171cb2acfcbed Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Wed, 12 Aug 2009 09:19:06 +0200 Subject: Fix imports/code for portage 2.2 --- src/tinderbox/__init__.py | 10 +++++++--- 1 file 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') -- cgit v1.2.3-65-gdbad