summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-01-23 12:54:54 -0500
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-01-23 12:59:06 -0500
commit6088ef6e13c6bddb65fd6e73c3b8801e42fc8d9e (patch)
tree98681c1ebeba226dc5c150a78a4fb36083dacd48 /src/lib
parentfa0cd53c5271ebffebad4e1fa275193088c4dc78 (diff)
downloadbcfg2-6088ef6e13c6bddb65fd6e73c3b8801e42fc8d9e.tar.gz
bcfg2-6088ef6e13c6bddb65fd6e73c3b8801e42fc8d9e.tar.bz2
bcfg2-6088ef6e13c6bddb65fd6e73c3b8801e42fc8d9e.zip
fixed parsing of newer yum repos (#1027)
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Server/Plugins/Packages/Yum.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/Server/Plugins/Packages/Yum.py b/src/lib/Server/Plugins/Packages/Yum.py
index 76ea62060..13a553031 100644
--- a/src/lib/Server/Plugins/Packages/Yum.py
+++ b/src/lib/Server/Plugins/Packages/Yum.py
@@ -590,10 +590,11 @@ class YumSource(Source):
pdata = pkg.find(XP + 'format')
self.deps[arch][pkgname] = set()
pre = pdata.find(RP + 'requires')
- for entry in pre.getchildren():
- self.deps[arch][pkgname].add(entry.get('name'))
- if entry.get('name').startswith('/'):
- self.needed_paths.add(entry.get('name'))
+ if pre is not None:
+ for entry in pre.getchildren():
+ self.deps[arch][pkgname].add(entry.get('name'))
+ if entry.get('name').startswith('/'):
+ self.needed_paths.add(entry.get('name'))
pro = pdata.find(RP + 'provides')
if pro != None:
for entry in pro.getchildren():