From 5151987063eab58b10a2dd8e831ec036df217531 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Tue, 23 Mar 2021 01:12:04 +0300 Subject: Convert Path object to a str * gn3/file_utils.py (cache_ipfs_file): Return a str instead of a path object. * tests/unit/test_file_utils.py: Update failing tests. --- gn3/file_utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gn3') diff --git a/gn3/file_utils.py b/gn3/file_utils.py index 5296613..73f6567 100644 --- a/gn3/file_utils.py +++ b/gn3/file_utils.py @@ -91,7 +91,8 @@ def cache_ipfs_file(ipfs_file: str, if not os.path.exists(file_loc): client = ipfshttpclient.connect(ipfs_addr) client.get(ipfs_file, - target=pathlib.Path - (os.path.join(cache_dir, - ipfs_file.split("ipfs/")[-1])).parent) + target=str( + pathlib.Path + (os.path.join(cache_dir, + ipfs_file.split("ipfs/")[-1])).parent)) return file_loc -- cgit v1.2.3