summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Dolbec <brian.dolbec@gmail.com>2010-08-09 01:05:03 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-09 17:40:26 -0700
commit5acf89e806372305dd77226e09b987f1b9c210d7 (patch)
tree5cb28bb5ed0aa26e62774274f6eb71a68fd9958e
parent0432135c5213c710ecbc6cdc9e50adfc0d8daa22 (diff)
downloadportage-5acf89e806372305dd77226e09b987f1b9c210d7.tar.gz
portage-5acf89e806372305dd77226e09b987f1b9c210d7.tar.bz2
portage-5acf89e806372305dd77226e09b987f1b9c210d7.zip
add optional list support for mytree to complinment the trees param in cp_list()
-rw-r--r--pym/portage/dbapi/porttree.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index 956d6a80a..77c88c85a 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -908,7 +908,10 @@ class portdbapi(dbapi):
invalid_category = mysplit[0] not in self._categories
d={}
if mytree:
- mytrees = [mytree]
+ if isinstance(mytree, str):
+ mytrees = [mytree]
+ elif not isinstance(mytree, list):
+ raise AssertionError("Invalid input type: %s" %str(type(mytree)))
else:
mytrees = self.porttrees
for oroot in mytrees: