Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
Couple fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jjeff07 committed Dec 6, 2022
1 parent 19cb538 commit b8b5604
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ipfabric/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def check_version(self, api_version, base_url, dev=False):
api_version.lstrip("v").split(".")
if api_version
else importlib_metadata.version("ipfabric").lstrip("v").split(".")
)
) #TODO need to fix for handling 'v#' instead of 'v#.#'

resp = self.get(urljoin(base_url, "api/version" if not dev else "version"))
resp.raise_for_status()
Expand Down
2 changes: 1 addition & 1 deletion ipfabric/snapshot_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def download(self, ipf: IPFClient, path: str = None, timeout: int = 60, retry: i
path = Path(f"{self.snapshot_id}.tar")
elif not isinstance(path, Path):
path = Path(f"{path}")
if path.name.endswith('.tar'):
if not path.name.endswith('.tar'):
path = Path(f"{path.name}.tar")

# start download job
Expand Down

0 comments on commit b8b5604

Please sign in to comment.