From: Ansgar Burchardt Date: Tue, 18 Aug 2015 20:19:18 +0000 (+0200) Subject: Define regular expressions only once X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=3cab1066a3d166b418a4c85ade4b41937e3a850c;p=dak.git Define regular expressions only once Two regexes were defined twice. --- diff --git a/daklib/regexes.py b/daklib/regexes.py index cf08024e..6a1acd82 100644 --- a/daklib/regexes.py +++ b/daklib/regexes.py @@ -58,8 +58,6 @@ re_parse_maintainer = re.compile(r"^\s*(\S.*\S)\s*\<([^\>]+)\>") re_srchasver = re.compile(r"^(\S+)\s+\((\S+)\)$") re_verwithext = re.compile(r"^(\d+)(?:\.(\d+))(?:\s+\((\S+)\))?$") -re_srchasver = re.compile(r"^(\S+)\s+\((\S+)\)$") - html_escaping = {'"':'"', '&':'&', '<':'<', '>':'>'} re_html_escaping = re.compile('|'.join(map(re.escape, html_escaping.keys()))) @@ -84,7 +82,6 @@ re_taint_free = re.compile(r"^['/;\-\+\.~\s\w]+$") # From process_unchecked.py re_changelog_versions = re.compile(r"^\w[-+0-9a-z.]+ \([^\(\) \t]+\)") -re_spacestrip = re.compile('(\s)') # From dak/rm.py re_strip_source_version = re.compile (r'\s+.*$')