diff options
author | Brian Dolbec <brian.dolbec@gmail.com> | 2010-08-09 01:05:03 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-09 17:40:26 -0700 |
commit | 5acf89e806372305dd77226e09b987f1b9c210d7 (patch) | |
tree | 5cb28bb5ed0aa26e62774274f6eb71a68fd9958e | |
parent | 0432135c5213c710ecbc6cdc9e50adfc0d8daa22 (diff) | |
download | portage-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.py | 5 |
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: |