diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2009-04-23 16:15:32 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2009-04-23 16:15:32 +0000 |
commit | abe427c90fa720ec6eea93a230e2ab4fc81a87be (patch) | |
tree | 5bc085f2eae60d5fd95eb994a8d5158307b352fc /src/lib | |
parent | 71c7f386c08059234dda65bd153c3bec7ff2aca9 (diff) | |
download | bcfg2-abe427c90fa720ec6eea93a230e2ab4fc81a87be.tar.gz bcfg2-abe427c90fa720ec6eea93a230e2ab4fc81a87be.tar.bz2 bcfg2-abe427c90fa720ec6eea93a230e2ab4fc81a87be.zip |
Packages patch from Tim Laszlo
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5171 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Server/Plugins/Packages.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/lib/Server/Plugins/Packages.py b/src/lib/Server/Plugins/Packages.py index ba4206c1d..2b00d68b6 100644 --- a/src/lib/Server/Plugins/Packages.py +++ b/src/lib/Server/Plugins/Packages.py @@ -163,11 +163,12 @@ class YUMSource(Source): for entry in pre.getchildren(): self.deps[arch][pkgname].add(entry.get('name')) pro = pdata.find(self.rp + 'provides') - for entry in pro.getchildren(): - prov = entry.get('name') - if prov not in self.provides[arch]: - self.provides[arch][prov] = list() - self.provides[arch][prov].append(pkgname) + if pro != None: + for entry in pro.getchildren(): + prov = entry.get('name') + if prov not in self.provides[arch]: + self.provides[arch][prov] = list() + self.provides[arch][prov].append(pkgname) def is_package(self, metadata, item): arch = [a for a in self.arches if a in metadata.groups][0] @@ -345,7 +346,10 @@ class Packages(Bcfg2.Server.Plugin.Plugin, oldp = pkgs oldu = unknown for source in sources: - pkgs, unknown = source.complete(meta, pkgs, unknown) + try: + pkgs, unknown = source.complete(meta, pkgs, unknown) + except: + self.logger.error("Packages: complete call failed unexpectedly:", exc_info=1) return pkgs, unknown, ptype.pop() def validate_structures(self, meta, structures): |