X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fupload.py;fp=daklib%2Fupload.py;h=059cc51189299f5bbad2f3732e340fd7ad29552b;hb=5b73e91da92d1a329e996cb7591b365c30abe750;hp=a6f1e4b819072c228e4c1a17b89cad944a7a81ea;hpb=f82de9f5e2c603f4443af5a663c3649350a18e43;p=dak.git diff --git a/daklib/upload.py b/daklib/upload.py index a6f1e4b8..059cc511 100644 --- a/daklib/upload.py +++ b/daklib/upload.py @@ -191,7 +191,7 @@ def parse_file_list(control, has_priority_and_section): continue (sha1sum, size, filename) = line.split() entry = entries.get(filename, None) - if entry.get('size', None) != long(size): + if entry is not None and entry.get('size', None) != long(size): raise InvalidChangesException('Size for {0} in Files and Checksum-Sha1 fields differ.'.format(filename)) entry['sha1sum'] = sha1sum @@ -200,9 +200,7 @@ def parse_file_list(control, has_priority_and_section): continue (sha256sum, size, filename) = line.split() entry = entries.get(filename, None) - if entry is None: - raise InvalidChangesException('No sha256sum for {0}.'.format(filename)) - if entry.get('size', None) != long(size): + if entry is not None and entry.get('size', None) != long(size): raise InvalidChangesException('Size for {0} in Files and Checksum-Sha256 fields differ.'.format(filename)) entry['sha256sum'] = sha256sum