]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/srcformats.py
Compare None with object identity, not equality
[dak.git] / daklib / srcformats.py
index d6079a0f5df6a9067445b5d366d4a4e51865b5ac..735b7b686c26b8f06bf5827c64ee215b1ef78d96 100644 (file)
@@ -30,21 +30,22 @@ class SourceFormat(type):
     @classmethod
     def parse_format(cls, txt, is_a_dsc=False, field='files'):
         format = re_verwithext.search(txt)
-        if not format:
+
+        if format is None:
             raise UnknownFormatError, txt
 
         format = format.groups()
-        if format[1] == None:
+
+        if format[1] is None:
             format = int(float(format[0])), 0, format[2]
         else:
             format = int(format[0]), int(format[1]), format[2]
-        if format[2] == None:
+
+        if format[2] is None:
             format = format[:2]
 
         if is_a_dsc:
-            # format = (0,0) are missing format headers of which we still
-            # have some in the archive.
-            if format != (1,0) and format != (0,0) and \
+            if format != (1,0) and \
                format != (3,0,"quilt") and format != (3,0,"native"):
                 raise UnknownFormatError, txt
         else: