]> git.decadent.org.uk Git - dak.git/commitdiff
Define regular expressions only once
authorAnsgar Burchardt <ansgar@debian.org>
Tue, 18 Aug 2015 20:19:18 +0000 (22:19 +0200)
committerAnsgar Burchardt <ansgar@debian.org>
Tue, 18 Aug 2015 20:19:18 +0000 (22:19 +0200)
Two regexes were defined twice.

daklib/regexes.py

index cf08024e5515db29b485a99c9d0ec873bf7665d4..6a1acd828e6a7185ad825bfc092915c5cbec7995 100644 (file)
@@ -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 = {'"':'&quot;', '&':'&amp;', '<':'&lt;', '>':'&gt;'}
 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+.*$')