]> git.decadent.org.uk Git - dak.git/commitdiff
Make it more robust
authorJoerg Jaspert <joerg@debian.org>
Fri, 25 Apr 2008 22:16:42 +0000 (00:16 +0200)
committerJoerg Jaspert <joerg@debian.org>
Fri, 25 Apr 2008 22:16:42 +0000 (00:16 +0200)
dak/process_unchecked.py

index 498eb49f0dd6a21da49cd2d76bb0e052c3efbf26..04038a2568409ad503a03215b57941d13c7e8528 100755 (executable)
@@ -463,13 +463,15 @@ def check_files():
                 reject("%s: Depends field is empty." % (file))
 
             # Sanity-check the Provides field
-            provides = re_spacestrip.sub('', control.Find("Provides"))
-            if provides == '':
-                reject("%s: Provides field is empty." % (file))
-            prov_list = provides.split(",")
-            for prov in prov_list:
-                if not re_valid_pkg_name.match(prov):
-                    reject("%s: Invalid Provides field content %s." % (file, prov))
+            provides = control.Find("Provides")
+            if provides:
+                provide = re_spacestrip.sub('', provides)
+                if provide == '':
+                    reject("%s: Provides field is empty." % (file))
+                prov_list = provide.split(",")
+                for prov in prov_list:
+                    if not re_valid_pkg_name.match(prov):
+                        reject("%s: Invalid Provides field content %s." % (file, prov))
 
 
             # Check the section & priority match those given in the .changes (non-fatal)