From 3af50951fb957de0371f6231a308457df7507f2c Mon Sep 17 00:00:00 2001 From: Ville Skyttä Date: Wed, 3 Jul 2013 00:28:14 +0300 Subject: Cope with multiple whitespaces between regex and URL. Previously extra whitespace was appended to the regex, causing failures. As a side effect, whitespace within regex is now allowed. --- cnucnu/package_list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cnucnu/package_list.py b/cnucnu/package_list.py index 8146800..a530474 100755 --- a/cnucnu/package_list.py +++ b/cnucnu/package_list.py @@ -410,7 +410,7 @@ class PackageList: packages = [] repo.package_list = self - package_line_regex = re.compile('\s+\\*\s+(\S+)\s+(.+)\s+(\S+)\s*') + package_line_regex = re.compile('^\s+\\*\s+(\S+)\s+(.+?)\s+(\S+)\s*$') for package_data in helper.match_interval(page_text, package_line_regex, "== List Of Packages ==", ""): (name, regex, url) = package_data nagging = True -- cgit