@staticmethod
def get_id_from_about_string(about):
- return int(about.split('/')[-1].split('-')[1])
+ """
+ returns something like DSA-1232-1
+ """
+ return about.split('/')[-1].upper()
def get_dsa_list(self, after_dsa_id, since):
"""
out = []
last_dsa = conf_get('plugins.dsa-watcher.last_dsa')
# configobj, why u no work?
- if last_dsa and last_dsa != "None":
- last_dsa = int(last_dsa)
- else:
- last_dsa = 0
+ if not (last_dsa and last_dsa != "None"):
+ # as we do string comparison for DSA IDs, this will do fine
+ last_dsa = ""
last_dsa_date = conf_get('plugins.dsa-watcher.last_dsa_date')
if last_dsa_date:
logger.debug('Searching for DSA after {}'.format(since))
for dsa, date, package in self.get_dsa_list(after_dsa_id=last_dsa, since=since):
- url = 'https://security-tracker.debian.org/tracker/DSA-%d-1' % dsa
+ url = 'https://security-tracker.debian.org/tracker/{}'.format(dsa)
msg = '[{}] new Debian Security Announce found ({}): {}'.format(date, package, url)
out.append(msg)