Python 2 fix - yes, really
This commit is contained in:
parent
afb2275209
commit
74bb9e76b6
1 changed files with 2 additions and 3 deletions
|
@ -101,10 +101,9 @@ def _check_stripurl(strip, scraperobj):
|
|||
return
|
||||
# test that the stripUrl regex matches the retrieved strip URL
|
||||
urlmatch = re.escape(scraperobj.stripUrl)
|
||||
urlmatch = urlmatch.replace(r"%s", r".+")
|
||||
urlmatch = "^%s$" % urlmatch
|
||||
urlmatch = urlmatch.replace('\\%', '%').replace(r"%s", r".+")
|
||||
ro = re.compile(urlmatch)
|
||||
mo = ro.search(strip.strip_url)
|
||||
mo = ro.match(strip.strip_url)
|
||||
err = 'strip URL {!r} does not match stripUrl pattern {}'.format(
|
||||
strip.strip_url, urlmatch)
|
||||
assert mo is not None, err
|
||||
|
|
Loading…
Reference in a new issue