]> git.decadent.org.uk Git - dak.git/commitdiff
use discard instead of remove
authorAnsgar Burchardt <ansgar@debian.org>
Fri, 6 Jul 2012 21:13:41 +0000 (15:13 -0600)
committerAnsgar Burchardt <ansgar@debian.org>
Sat, 7 Jul 2012 13:42:54 +0000 (07:42 -0600)
Uploads that do not include source would trigger an exception when
remove is used.  discard does not raise an exception when the element
does not exist.

Signed-off-by: Ansgar Burchardt <ansgar@debian.org>
daklib/checks.py

index adee6241cc6ef9a83cfa1c823984d0a392621eb9..209a0945c14ef950953bab4ca9f4337d8593a08d 100644 (file)
@@ -387,7 +387,7 @@ class ACLCheck(Check):
             raise Reject('Unknown source_acl access level {0} for fingerprint {1}'.format(source_acl.access_level, fingerprint.fingerprint))
 
         bin_architectures = set(upload.changes.architectures)
-        bin_architectures.remove('source')
+        bin_architectures.discard('source')
         binary_acl = fingerprint.binary_acl
         if binary_acl is None:
             if len(bin_architectures) > 0: