From 5acf89e806372305dd77226e09b987f1b9c210d7 Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Mon, 9 Aug 2010 01:05:03 -0700 Subject: [PATCH] add optional list support for mytree to complinment the trees param in cp_list() --- pym/portage/dbapi/porttree.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: -- 2.26.2