Fix invalid backslash characters
* https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior Signed-off-by: Alfred Wingate <parona@protonmail.com>
This commit is contained in:
@@ -122,7 +122,7 @@ def scan_directory_recursive(cp, ver, rev, url, steps, orig_url, options):
|
||||
|
||||
results = []
|
||||
|
||||
if re.search(b"<\s*a\s+[^>]*href", data, re.I):
|
||||
if re.search(rb"<\s*a\s+[^>]*href", data, re.I):
|
||||
results.extend(scan_html(data, url, pattern))
|
||||
elif url.startswith("ftp://"):
|
||||
results.extend(scan_ftp(data, url, pattern))
|
||||
|
@@ -20,7 +20,7 @@ def can_handle(pkg, url=None):
|
||||
|
||||
|
||||
def guess_package_and_channel(cp, url):
|
||||
match = re.search("http://(.*)\.php\.net/get/(.*)-(.*).tgz", url)
|
||||
match = re.search(r"http://(.*)\.php\.net/get/(.*)-(.*).tgz", url)
|
||||
|
||||
if match:
|
||||
host = match.group(1)
|
||||
|
@@ -19,7 +19,7 @@ def can_handle(pkg, url=None):
|
||||
|
||||
|
||||
def guess_package(cp, url):
|
||||
match = re.search("mirror://pypi/\w+/(.*)/.*", url)
|
||||
match = re.search(r"mirror://pypi/\w+/(.*)/.*", url)
|
||||
if match:
|
||||
return match.group(1)
|
||||
|
||||
|
@@ -24,7 +24,7 @@ def can_handle(*args):
|
||||
|
||||
|
||||
def handle_directory_patterns(base, file_pattern):
|
||||
"""
|
||||
r"""
|
||||
Directory pattern matching
|
||||
e.g.: base: ftp://ftp.nessus.org/pub/nessus/nessus-([\d\.]+)/src/
|
||||
file_pattern: nessus-core-([\d\.]+)\.tar\.gz
|
||||
|
Reference in New Issue
Block a user