Skip to content

Commit

Permalink
Fix B018 errors reported by flake8-bugbear 23.12.2
Browse files Browse the repository at this point in the history
  • Loading branch information
nsoranzo committed Dec 11, 2023
1 parent 65f1633 commit 9339fb3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/galaxy/config_watchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ def reload_toolbox():
try:
# Run and wait for toolbox reload on the process that watches the config files.
# The toolbox reload will update the integrated_tool_panel_file
self.app.queue_worker.send_local_control_task("reload_toolbox", get_response=True),
self.app.queue_worker.send_local_control_task("reload_toolbox", get_response=True)
except Exception:
save_integrated_tool_panel = True
log.exception("Exception occured while reloading toolbox")
self.app.queue_worker.send_control_task(
"reload_toolbox", noop_self=True, kwargs={"save_integrated_tool_panel": save_integrated_tool_panel}
),
)

self.tool_config_watcher = get_tool_conf_watcher(
reload_callback=reload_toolbox,
Expand Down
4 changes: 2 additions & 2 deletions scripts/microbes/harvest_bacteria.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,17 @@ def get_chroms_by_project_id(
):
html_count = 0
html = None
url = f"{base_url}{org_num}"
while html_count < 500 and html is None:
html_count += 1
url = f"{base_url}{org_num}"
try:
html = requests.get(url).text
except Exception:
print("GENOME PROJECT FAILED:", html_count, "org:", org_num, url)
html = None
time.sleep(1) # Throttle Connection
if html is None:
"GENOME PROJECT COMPLETELY FAILED TO LOAD", "org:", org_num, "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=genomeprj&cmd=Retrieve&dopt=Overview&list_uids=" + org_num
print("GENOME PROJECT COMPLETELY FAILED TO LOAD", "org:", org_num, url)
return None

chroms = []
Expand Down

0 comments on commit 9339fb3

Please sign in to comment.