diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2007-08-08 02:21:06 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2007-08-08 02:21:06 +0000 |
commit | 7371ec21031e6f074b9952a31858cd1a0d37880b (patch) | |
tree | ed8855e84eecee81f6f54442cda01528ec8bf017 /src/lib | |
parent | cf4b95f1b9e460a3905701feb1040b6c9038e141 (diff) | |
download | bcfg2-7371ec21031e6f074b9952a31858cd1a0d37880b.tar.gz bcfg2-7371ec21031e6f074b9952a31858cd1a0d37880b.tar.bz2 bcfg2-7371ec21031e6f074b9952a31858cd1a0d37880b.zip |
Fix minor pkgmgr XMLSrc bug introduced by info.xml changes
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3611 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Server/Plugin.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/Server/Plugin.py b/src/lib/Server/Plugin.py index 5f08934e8..fc5221f82 100644 --- a/src/lib/Server/Plugin.py +++ b/src/lib/Server/Plugin.py @@ -276,7 +276,7 @@ class XMLSrc(XMLFileBacked): '''XMLSrc files contain a LNode hierarchy that returns matching entries''' __node__ = INode - def __init__(self, filename, noprio='False'): + def __init__(self, filename, noprio=False): XMLFileBacked.__init__(self, filename) self.items = {} self.cache = None @@ -299,10 +299,10 @@ class XMLSrc(XMLFileBacked): return self.pnode = self.__node__(xdata, self.items) self.cache = None - if not self.noprio: - try: - self.priority = int(xdata.get('priority')) - except (ValueError, TypeError): + try: + self.priority = int(xdata.get('priority')) + except (ValueError, TypeError): + if not self.noprio: logger.error("Got bogus priority %s for file %s" % (xdata.get('priority'), self.name)) del xdata, data @@ -364,6 +364,8 @@ class PrioDir(Plugin, XMLDirectoryBacked): if prio.count(max(prio)) > 1: self.logger.error("Found conflicting %s sources with same priority for %s, pkg %s" % (entry.tag.lower(), metadata.hostname, entry.get('name'))) + self.logger.error([item.name for item in matching]) + self.logger.error("Prio was %s" % max(prio)) raise PluginExecutionError index = prio.index(max(prio)) |