8000 Fix regexes for version checks to be raw string by machawk1 · Pull Request #586 · machawk1/wail · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix regexes for version checks to be raw string #586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions bundledApps/WAIL.py
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ def get_heritrix_version(self):

for file in os.listdir(htrix_lib_path):
if file.startswith("heritrix-commons"):
regex = re.compile("commons-(.*)\.")
regex = re.compile(r"commons-(.*)\.")
h_version = regex.findall(file)[0]
try:
h_version = f'{h_version[: h_version.index("-")]}*'
Expand All @@ -958,7 +958,7 @@ def get_wayback_version():

for file in os.listdir(tomcat_lib_path):
if file.startswith("openwayback-core"):
regex = re.compile("core-(.*)\.")
regex = re.compile(r"core-(.*)\.")
return regex.findall(file)[0]

@staticmethod
Expand All @@ -980,7 +980,7 @@ def get_tomcat_version():
version = ""
for line in f.readlines():
if "Apache Tomcat Version " in line:
version = re.sub("[^0-9^\.]", "", line)
version = re.sub(r"[^0-9^\.]", "", line)
break
f.close()
return version
Expand Down Expand Up @@ -2162,7 +2162,7 @@ def set_versions_in_panel(self) -> None:
def get_heritrix_version() -> str:
for file in os.listdir(f"{config.heritrix_path}lib/"):
if file.startswith("heritrix-commons"):
regex = re.compile("commons-(.*)\.")
regex = re.compile(r"commons-(.*)\.")
h_version = regex.findall(file)[0]
try:
h_version = f'{h_version[: h_version.index("-")]}*'
Expand All @@ -2176,7 +2176,7 @@ def get_heritrix_version() -> str:
def get_wayback_version() -> str:
for file in os.listdir(f"{config.tomcat_path}/webapps/lib/"):
if file.startswith("openwayback-core"):
regex = re.compile("core-(.*)\.")
regex = re.compile(r"core-(.*)\.")
return regex.findall(file)[0]

# TODO: move layout management to responsibility of sub-panels, UNUSED now
Expand Down
Loading
0