]> git.decadent.org.uk Git - dak.git/commitdiff
Use set() instead of Perlesque hash[key] = 1
authorChris Lamb <lamby@debian.org>
Tue, 27 Oct 2009 19:36:51 +0000 (19:36 +0000)
committerChris Lamb <lamby@debian.org>
Tue, 27 Oct 2009 19:36:51 +0000 (19:36 +0000)
Signed-off-by: Chris Lamb <lamby@debian.org>
daklib/queue.py

index 3e2e6ef58d56458ca2a7114a4cda5da006eaa674..c2377294778ac96e3e55d463bf0e06661fb8c616 100755 (executable)
@@ -1225,14 +1225,14 @@ class Upload(object):
         # through lintians output later to see if its a fatal tag we detected, or not.
         # So we only run lintian once on all tags, even if we might reject on some, but not
         # reject on others.
-        # Additionally built up a hash of tags
-        tags = {}
+        # Additionally build up a set of tags
+        tags = set()
         (fd, temp_filename) = utils.temp_filename()
         temptagfile = os.fdopen(fd, 'w')
         for tagtype in lintiantags:
             for tag in lintiantags[tagtype]:
                 temptagfile.write(tag)
-                tags[tag]=1
+                tags.add(tag)
         temptagfile.close()
 
         # So now we should look at running lintian at the .changes file, capturing output
@@ -1259,7 +1259,7 @@ class Upload(object):
                     etext = m.group(4)
 
                     # So lets check if we know the tag at all.
-                    if tags.has_key(etag):
+                    if etag in tags:
                         if etype == 'O':
                             # We know it and it is overriden. Check that override is allowed.
                             if lintiantags['warning'][etag]: