summaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/sandcrawler.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-10-27 14:33:09 -0700
committerBryan Newbold <bnewbold@archive.org>2021-10-27 18:25:58 -0700
commitb4d0bfb643842e6070a4ee36cfc52e2292e3b5ba (patch)
tree1988743c61f5c053148d66f6939ff32f398ae06e /fatcat_scholar/sandcrawler.py
parent956e64f47f7d47f2539cd6575c25ec0b6a33e567 (diff)
downloadfatcat-scholar-b4d0bfb643842e6070a4ee36cfc52e2292e3b5ba.tar.gz
fatcat-scholar-b4d0bfb643842e6070a4ee36cfc52e2292e3b5ba.zip
make fmt (black 21.9b0)
Diffstat (limited to 'fatcat_scholar/sandcrawler.py')
-rw-r--r--fatcat_scholar/sandcrawler.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/fatcat_scholar/sandcrawler.py b/fatcat_scholar/sandcrawler.py
index 9f9f7e4..087cdc6 100644
--- a/fatcat_scholar/sandcrawler.py
+++ b/fatcat_scholar/sandcrawler.py
@@ -69,7 +69,10 @@ class SandcrawlerMinioClient:
secret_key=os.environ['MINIO_SECRET_KEY'],
"""
self.mc = minio.Minio(
- host_url, access_key=access_key, secret_key=secret_key, secure=False,
+ host_url,
+ access_key=access_key,
+ secret_key=secret_key,
+ secure=False,
)
self.default_bucket = default_bucket
@@ -80,7 +83,12 @@ class SandcrawlerMinioClient:
prefix = ""
assert len(sha1hex) == 40
obj_path = "{}{}/{}/{}/{}{}".format(
- prefix, folder, sha1hex[0:2], sha1hex[2:4], sha1hex, extension,
+ prefix,
+ folder,
+ sha1hex[0:2],
+ sha1hex[2:4],
+ sha1hex,
+ extension,
)
return obj_path
@@ -101,6 +109,9 @@ class SandcrawlerMinioClient:
if not bucket:
bucket = self.default_bucket
assert bucket
- blob = self.mc.get_object(bucket, obj_path,)
+ blob = self.mc.get_object(
+ bucket,
+ obj_path,
+ )
# TODO: optionally verify SHA-1?
return blob.data