RemoteBts.__init__(self, cnf, bugre, urifmt)
def __getClosingStatus(self):
- return self._cnf['closing']
+ if 'closing' in self._cnf:
+ return self._cnf['closing']
+
+ config = urllib.urlopen(self._cnf['uri'] + '/config.cgi')
+ for l in config.readlines():
+ if l.startswith('var status_closed'):
+ s = l[l.find('['):].strip('[] ,;\r\t\n')
+ self._cnf['closing'] = [x.strip("' ") for x in s.split(',')]
+ config.close()
+ return self._cnf['closing']
+
def isClosing(self, status, resolution):
return resolution != 'WONTFIX' and status in self.__getClosingStatus()
def __init__(self, cnf):
OldRemoteBugzilla.__init__(self, cnf)
- def __getClosingStatus(self):
- if 'closing' in self._cnf:
- return self._cnf['closing']
-
- config = urllib.urlopen(self._cnf['uri'] + '/config.cgi')
- for l in config.readlines():
- if l.startswith('var status_closed'):
- s = l[l.find('['):].strip('[] ,;\r\t\n')
- self._cnf['closing'] = [x.strip("' ") for x in s.split(',')]
- config.close()
- return self._cnf['closing']
-
- def isClosing(self, status, resolution):
- return resolution != 'WONTFIX' and status in self.__getClosingStatus()
-
def enqueue(self, btsbug, fwd):
self._queue.append((btsbug, self.extractBugid(fwd)))