diff options
author | 2016-06-19 13:09:34 -0400 | |
---|---|---|
committer | 2016-06-19 13:09:34 -0400 | |
commit | 076b56dcd0099550a4836e9ebf7decd68458d62a (patch) | |
tree | b0b37991d5542f190202f3c010140cd1c73ca6f8 | |
parent | ebuild/repository: _UnconfiguredTree: make trees a public attribute (diff) | |
download | pkgcore-076b56dcd0099550a4836e9ebf7decd68458d62a.tar.gz pkgcore-076b56dcd0099550a4836e9ebf7decd68458d62a.tar.bz2 pkgcore-076b56dcd0099550a4836e9ebf7decd68458d62a.zip |
util/repo_utils: get_raw_repos(): check type instead of attr existence
Regular repos now have the trees attribute used to denote inherited
masters along with the target repo.
-rw-r--r-- | pkgcore/util/repo_utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgcore/util/repo_utils.py b/pkgcore/util/repo_utils.py index 7520fa672..0dcc607b7 100644 --- a/pkgcore/util/repo_utils.py +++ b/pkgcore/util/repo_utils.py @@ -7,7 +7,7 @@ misc. repository related tools __all__ = ("get_raw_repos", "get_virtual_repos") -from pkgcore.repository import virtual +from pkgcore.repository import virtual, multiplex def get_raw_repos(repo): @@ -21,7 +21,7 @@ def get_raw_repos(repo): return l while getattr(repo, "raw_repo", None) is not None: repo = repo.raw_repo - if hasattr(repo, "trees"): + if isinstance(repo, multiplex.tree): l = [] map(l.extend, (get_raw_repos(x) for x in repo.trees)) return l |