Skip to content

Commit

Permalink
add manual overwrite option for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu committed May 26, 2023
1 parent 766b87a commit 397ddec
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions nf_core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ def check_if_outdated(current_version=None, remote_version=None, source_url="htt
source_url = f"{source_url}?v={current_version}"
# check if we have a newer version without blocking the rest of the script
is_outdated = False
remote_version = None
try:
with concurrent.futures.ThreadPoolExecutor() as executor:
future = executor.submit(fetch_remote_version, source_url)
remote_version = future.result()
except Exception as e:
log.debug(f"Could not check for nf-core updates: {e}")
if remote_version is None: # we set it manually for tests
try:
with concurrent.futures.ThreadPoolExecutor() as executor:
future = executor.submit(fetch_remote_version, source_url)
remote_version = future.result()
except Exception as e:
log.debug(f"Could not check for nf-core updates: {e}")
if remote_version is not None:
if Version(remote_version) > Version(current_version):
is_outdated = True
Expand Down

0 comments on commit 397ddec

Please sign in to comment.