From 57451c85834533ab92c4d689891a0db72b259d38 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Tue, 21 Jun 2022 15:09:03 +0300 Subject: gn3: fs_helpers: Remove ipfshttpclient This library pollutes the Genenetwork2 profile with an old version "dataclasses" thereby causing it to fail. --- gn3/fs_helpers.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'gn3') 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 "" -- cgit v1.2.3