From db992fe3b345d7de87d57b887485a5a7c820f2cb Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Thu, 12 Sep 2024 12:17:05 -0700 Subject: [PATCH] update to support python3 --- publishers/s3.py | 6 +++--- requirements.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/publishers/s3.py b/publishers/s3.py index 5d9e880..0e1c297 100644 --- a/publishers/s3.py +++ b/publishers/s3.py @@ -46,10 +46,10 @@ class S3(Publisher): redirect_meta = redirect['to'] k.key = item.path.replace(str(root), '') kmd5 = bucket.get_key(item.path.replace(str(root), '')) - #print 'f:', `item.path`, `kmd5.etag[1:-1], k.compute_md5(open(item.path))[0]` + #print('f:', repr(item.path), repr(kmd5.etag[1:-1], k.compute_md5(open(item.path))[0])) if kmd5 is None or \ - kmd5.etag[1:-1] != k.compute_md5(open(item.path))[0]: - print 'updating:', `item.path.replace(str(root), '')` + kmd5.etag[1:-1] != k.compute_md5(open(item.path, 'rb'))[0]: + print('updating:', repr(item.path.replace(str(root), ''))) k.set_contents_from_filename(item.path) if redirect_meta: k.set_metadata('website-redirect-location', redirect_meta) diff --git a/requirements.txt b/requirements.txt index a1ce748..a785deb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -git+https://github.com/jmgurney/hyde.git@c8a8aafe081ce7bf9ea90b7e260914522e546210 +git+https://www.funkthat.com/gitea/jmg/hyde@be6a0ec164309c102768970ef988c437c6a0afa6 boto