factor out the list of uploads to skip, for increase readibility

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent 55f22bc2
......@@ -70,6 +70,15 @@ class upload_history_gatherer(gatherer):
if self.is_ubuntu:
query_launchpad_closes = "EXECUTE uh_launchpad_close_insert(%(Source)s, %(Version)s, %(closes)s, %(File)s)"
# skip these uploads, they have been uploaded twice or more, but the archive
# software had already forgotten of them so it accepted the new uploads.
skip_uploads = {
('libapache-authznetldap-perl', '0.07-4'),
('knj10font', '1.01-1'),
('xmorph', '1:20010421'),
('cl-utilities', '1.2.4-1'),
}
added = {}
files = glob(path + '/*-changes*')
files.sort()
......@@ -130,10 +139,7 @@ class upload_history_gatherer(gatherer):
current['Message-Date'] = current['Date']
current['Message-Date'] = current['Message-Date'].partition('(')[0].replace('+4200','+0000').replace('+4300','+0000').replace('+4100','+0000').replace('+4400','+0000').replace('+4000','+0000')
if (current['Source'], current['Version']) in added or \
(current['Source'], current['Version']) == ('libapache-authznetldap-perl', '0.07-4') or \
(current['Source'], current['Version']) == ('knj10font', '1.01-1') or \
(current['Source'], current['Version']) == ('xmorph', '1:20010421') or \
(current['Source'], current['Version']) == ('cl-utilities', '1.2.4-1') or \
(current['Source'], current['Version']) in skip_uploads or \
current['Message-Date'] == 'None':
print "Skipping upload: "+current['Source']+" "+current['Version']+" "+current['Date']
current = {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment