From b8b5604bb58134080fe9c1693a71f2e65bf57299 Mon Sep 17 00:00:00 2001 From: Justin Jeffery Date: Tue, 6 Dec 2022 11:10:59 -0500 Subject: [PATCH] Couple fixes --- ipfabric/api.py | 2 +- ipfabric/snapshot_models.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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