diff options
author | BonfaceKilz | 2022-06-21 15:09:03 +0300 |
---|---|---|
committer | BonfaceKilz | 2022-06-21 15:21:47 +0300 |
commit | 57451c85834533ab92c4d689891a0db72b259d38 (patch) | |
tree | 578632714995a6147042c1b73c6d1d4e7807c548 | |
parent | cdf08dbdc33f5d80f407b4f8e41ad8d39e29cd23 (diff) | |
download | genenetwork3-57451c85834533ab92c4d689891a0db72b259d38.tar.gz |
gn3: fs_helpers: Remove ipfshttpclient
This library pollutes the Genenetwork2 profile with an old version
"dataclasses" thereby causing it to fail.
-rw-r--r-- | gn3/fs_helpers.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/gn3/fs_helpers.py b/gn3/fs_helpers.py index f313086..05767af 100644 --- a/gn3/fs_helpers.py +++ b/gn3/fs_helpers.py @@ -12,8 +12,6 @@ from typing import Dict from typing import List from werkzeug.utils import secure_filename -import ipfshttpclient - def get_hash_of_files(files: List[str]) -> str: """Given a list of valid of FILES, return their hash as a string""" @@ -86,12 +84,5 @@ def cache_ipfs_file(ipfs_file: str, cached file location """ - file_loc = os.path.join(cache_dir, ipfs_file.split("ipfs/")[-1]) - if not os.path.exists(file_loc): - client = ipfshttpclient.connect(ipfs_addr) - client.get(ipfs_file, - target=str( - pathlib.Path - (os.path.join(cache_dir, - ipfs_file.split("ipfs/")[-1])).parent)) - return file_loc + # IPFS httpclient doesn't work in Python3 + return "" |