summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-03-28 20:49:32 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-03-28 20:49:32 +0000
commitabc006ec95cbc409f395dbc62dd6a07ac88f91c4 (patch)
treecdc418b29c5ae9cf4d6f928a8726015b5222747d /src/lib
parent993084699d80d2400bd11cb7da920c92c88d5ea7 (diff)
downloadbcfg2-abc006ec95cbc409f395dbc62dd6a07ac88f91c4.tar.gz
bcfg2-abc006ec95cbc409f395dbc62dd6a07ac88f91c4.tar.bz2
bcfg2-abc006ec95cbc409f395dbc62dd6a07ac88f91c4.zip
Fix portage driver traceback (Resolves Ticket #649)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5145 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Client/Tools/Portage.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/Client/Tools/Portage.py b/src/lib/Client/Tools/Portage.py
index dc13a05d0..5ea0b18fc 100644
--- a/src/lib/Client/Tools/Portage.py
+++ b/src/lib/Client/Tools/Portage.py
@@ -25,13 +25,15 @@ class Portage(Bcfg2.Client.Tools.PkgTool):
def RefreshPackages(self):
'''Refresh memory hashes of packages'''
cache = self.cmd.run("equery -q list")[1]
+ pattern = re.compile('(.*)-(\d.*)')
self.installed = {}
for pkg in cache:
- pattern = re.compile('(.*)-(\d.*)')
if pattern.match(pkg):
name = pattern.match(pkg).group(1)
version = pattern.match(pkg).group(2)
- self.installed[name] = version
+ self.installed[name] = version
+ else:
+ self.logger.info("Failed to parse pkg name %s" % pkg)
def VerifyPackage(self, entry, modlist):
'''Verify package for entry'''