diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2004-10-01 21:04:09 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2004-10-01 21:04:09 +0000 |
commit | 598acb26932a99e230a95efe3cd3a0aa35b549bb (patch) | |
tree | d991128fd8fbc638411f461d437019bd27c23f57 /src/lib | |
parent | 6ba4073da549b88c69f5aaa59573257f700c34aa (diff) | |
download | bcfg2-598acb26932a99e230a95efe3cd3a0aa35b549bb.tar.gz bcfg2-598acb26932a99e230a95efe3cd3a0aa35b549bb.tar.bz2 bcfg2-598acb26932a99e230a95efe3cd3a0aa35b549bb.zip |
handle malformed entries better
(Logical change 1.69)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@350 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Client/Debian.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/Client/Debian.py b/src/lib/Client/Debian.py index 91d6db6f9..5fcc798f9 100644 --- a/src/lib/Client/Debian.py +++ b/src/lib/Client/Debian.py @@ -92,6 +92,10 @@ class Debian(Toolset): system("apt-get --reinstall -q=2 -y install %s=%s"%(e.attrib['name'],e.attrib['version'])) def InstallPackage(self, entry): + if not entry.attrib.has_key('version'): + print "Package entry for %s is malformed"%(entry.attrib['name']) + return False + if self.setup['dryrun'] or self.setup['verbose']: print "Installing package %s %s"%(entry.attrib['name'], entry.attrib['version']) |