From 337896958a30ff73566d40a6a30e01499fc46024 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Sat, 11 Mar 2023 02:20:57 +0000 Subject: [PATCH] Add support for IA_S3_{ACCESS,SECRET} environment variables --- ia-upload-stream | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ia-upload-stream b/ia-upload-stream index 345d931..75c2e0b 100755 --- a/ia-upload-stream +++ b/ia-upload-stream @@ -41,6 +41,9 @@ class PreventCompletionError(UploadError): def get_ia_access_secret(configFile = None): + if 'IA_S3_ACCESS' in os.environ and 'IA_S3_SECRET' in os.environ: + return os.environ['IA_S3_ACCESS'], os.environ['IA_S3_SECRET'] + if configFile is None: # This part of the code is identical (except for style changes) to the one in internetarchive and was written from scratch by JustAnotherArchivist in May and December 2021. candidates = []