summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Server/Plugin.py')
-rw-r--r--src/lib/Server/Plugin.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/Server/Plugin.py b/src/lib/Server/Plugin.py
index 3c32dcad7..5f08934e8 100644
--- a/src/lib/Server/Plugin.py
+++ b/src/lib/Server/Plugin.py
@@ -276,12 +276,13 @@ class XMLSrc(XMLFileBacked):
'''XMLSrc files contain a LNode hierarchy that returns matching entries'''
__node__ = INode
- def __init__(self, filename):
+ def __init__(self, filename, noprio='False'):
XMLFileBacked.__init__(self, filename)
self.items = {}
self.cache = None
self.pnode = None
self.priority = -1
+ self.noprio = noprio
def HandleEvent(self, _=None):
'''Read file upon update'''
@@ -298,10 +299,11 @@ class XMLSrc(XMLFileBacked):
return
self.pnode = self.__node__(xdata, self.items)
self.cache = None
- try:
- self.priority = int(xdata.get('priority'))
- except (ValueError, TypeError):
- logger.error("Got bogus priority %s for file %s" % (xdata.get('priority'), self.name))
+ if not self.noprio:
+ try:
+ self.priority = int(xdata.get('priority'))
+ except (ValueError, TypeError):
+ logger.error("Got bogus priority %s for file %s" % (xdata.get('priority'), self.name))
del xdata, data
def Cache(self, metadata):