From: Brian Dolbec Date: Mon, 9 Aug 2010 08:05:03 +0000 (-0700) Subject: add optional list support for mytree to complinment the trees param in cp_list() X-Git-Tag: v2.2_rc68~352 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5acf89e806372305dd77226e09b987f1b9c210d7;p=portage.git add optional list support for mytree to complinment the trees param in cp_list() --- 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: