Skip to content
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

Fix issue#347 #352

Merged
merged 1 commit into from
May 30, 2024
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
11 changes: 8 additions & 3 deletions autometa/config/databases.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,10 @@ def get_remote_checksum(self, section: str, option: str) -> str:
raise ValueError(
f"'section' must be 'ncbi' or 'markers'. Provided: {section}"
)
if not ncbi_is_connected():
raise ConnectionError("Cannot connect to the NCBI rsync server")
print(f"The section is : {section}")
if section == "ncbi":
if not ncbi_is_connected():
raise ConnectionError("Cannot connect to the NCBI rsync server")
host = self.config.get(section, "host")
ftp_fullpath = self.config.get("checksums", option)
chksum_fpath = ftp_fullpath.split(host)[-1]
Expand Down Expand Up @@ -604,7 +605,11 @@ def compare_checksums(self, section: str = None) -> Dict[str, Dict]:
# Skip user added options not required by Autometa
continue
# nodes.dmp, names.dmp and merged.dmp are all in taxdump.tar.gz
option = "taxdump" if option in {"nodes", "names", "merged", "delnodes"} else option
option = (
"taxdump"
if option in {"nodes", "names", "merged", "delnodes"}
else option
)
fpath = self.config.get(section, option)
fpath_md5 = f"{fpath}.md5"
# We can not checksum a file that does not exist.
Expand Down
Loading