Skip to content

Commit 026f9c9

Browse files
committed
Add a more robust container version search
1 parent 847fab8 commit 026f9c9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ui_function.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,10 @@ def init_run(main_window):
12741274

12751275
# Set at least the base version that this GUI supports
12761276
if len(supported_versions) == 0:
1277+
main_window.logger.info("No BiaPy compatible containers found in the landing page. Setting the default one {}".format(main_window.cfg.settings["biapy_code_version"]))
12771278
supported_versions = [main_window.cfg.settings["biapy_code_version"]]
1279+
else:
1280+
main_window.logger.info("Compatible containers found: {}".format(supported_versions))
12781281

12791282
main_window.ui.container_input.addItem(f"{supported_versions[0]}")
12801283
if len(supported_versions) > 1:

ui_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3728,7 +3728,7 @@ def check_supported_container_versions(gui_version, logger):
37283728

37293729
# Parse it
37303730
soup = BeautifulSoup(response.read(), from_encoding=response.headers.get_content_charset(), features="html.parser")
3731-
find_version = soup.find_all(string="v"+str(gui_version))
3731+
find_version = soup.find_all(string=re.compile(str(gui_version)))
37323732
if len(find_version) == 0:
37333733
print("Version not found in landing page...")
37343734
else:

0 commit comments

Comments
 (0)