summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/dbapi/porttree.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index 77c88c85a..b0cd5f49a 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -44,6 +44,7 @@ import sys
import warnings
if sys.hexversion >= 0x3000000:
+ basestring = str
long = int
def _src_uri_validate(cpv, eapi, src_uri):
@@ -907,11 +908,12 @@ class portdbapi(dbapi):
mysplit = mycp.split("/")
invalid_category = mysplit[0] not in self._categories
d={}
- if mytree:
- if isinstance(mytree, str):
+ if mytree is not None:
+ if isinstance(mytree, basestring):
mytrees = [mytree]
- elif not isinstance(mytree, list):
- raise AssertionError("Invalid input type: %s" %str(type(mytree)))
+ else:
+ # assume it's iterable
+ mytrees = mytree
else:
mytrees = self.porttrees
for oroot in mytrees: