From: Joerg Jaspert Date: Fri, 25 Apr 2008 22:16:42 +0000 (+0200) Subject: Make it more robust X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61aca7e682f3f94facc7b19677e8297edd075089;p=dak Make it more robust --- diff --git a/dak/process_unchecked.py b/dak/process_unchecked.py index 498eb49f..04038a25 100755 --- a/dak/process_unchecked.py +++ b/dak/process_unchecked.py @@ -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)