diff --git a/ipfabric/api.py b/ipfabric/api.py index df0356b..91ec1f7 100644 --- a/ipfabric/api.py +++ b/ipfabric/api.py @@ -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() diff --git a/ipfabric/snapshot_models.py b/ipfabric/snapshot_models.py index be84600..d12dfec 100644 --- a/ipfabric/snapshot_models.py +++ b/ipfabric/snapshot_models.py @@ -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