diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2013-07-03 00:28:14 +0300 |
---|---|---|
committer | Till Maas <opensource@till.name> | 2013-07-03 08:39:23 +0200 |
commit | 3af50951fb957de0371f6231a308457df7507f2c (patch) | |
tree | ca0f94d31b4fecb116f50890542a1b9c065246b3 | |
parent | 1c6879c29048b2d23024704daa908283b779f8d1 (diff) | |
download | cnucnu-3af50951fb957de0371f6231a308457df7507f2c.tar.gz cnucnu-3af50951fb957de0371f6231a308457df7507f2c.tar.xz cnucnu-3af50951fb957de0371f6231a308457df7507f2c.zip |
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.
-rwxr-xr-x | cnucnu/package_list.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 ==", "<!-- END LIST OF PACKAGES -->"): (name, regex, url) = package_data nagging = True |