From 61aca7e682f3f94facc7b19677e8297edd075089 Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Sat, 26 Apr 2008 00:16:42 +0200 Subject: [PATCH] Make it more robust --- dak/process_unchecked.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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) -- 2.39.5