summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2014-02-10 08:41:04 -0800
committerBrian Dolbec <dolsen@gentoo.org>2014-02-11 00:04:10 -0800
commit38c80ed1434f0b03b0d7c5fa2095f3310f913c36 (patch)
tree43e229595b2fe876c3b91bc740896597eb7c8383
parent4e1cf9a4949072a02c7857dd5715e0dd42116238 (diff)
downloadgentoolkit-38c80ed1434f0b03b0d7c5fa2095f3310f913c36.tar.gz
revdep_rebuild/assign.py: Make assign_packages() ignore files found in /var/db/pkg/
-rw-r--r--pym/gentoolkit/revdep_rebuild/assign.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/pym/gentoolkit/revdep_rebuild/assign.py b/pym/gentoolkit/revdep_rebuild/assign.py
index 4842ea9..11f7178 100644
--- a/pym/gentoolkit/revdep_rebuild/assign.py
+++ b/pym/gentoolkit/revdep_rebuild/assign.py
@@ -26,8 +26,14 @@ def assign_packages(broken, logger, settings):
'''
assigned = set()
for group in os.listdir(settings['PKG_DIR']):
- for pkg in os.listdir(settings['PKG_DIR'] + group):
- f = settings['PKG_DIR'] + group + '/' + pkg + '/CONTENTS'
+ grppath = settings['PKG_DIR'] + group
+ if not os.path.isdir(grppath):
+ continue
+ for pkg in os.listdir(grppath):
+ pkgpath = settings['PKG_DIR'] + group + '/' + pkg
+ if not os.path.isdir(pkgpath):
+ continue
+ f = pkgpath + '/CONTENTS'
if os.path.exists(f):
try:
with open(f, 'r') as cnt: