From fbcb64cc69e2f362dbe67a9dca9bfe1cc72f5c29 Mon Sep 17 00:00:00 2001 From: Liam Beckman Date: Fri, 15 Dec 2023 11:26:14 -0800 Subject: [PATCH] Revert changes to indexd data blueprint --- fence/blueprints/data/indexd.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/fence/blueprints/data/indexd.py b/fence/blueprints/data/indexd.py index ca88d8c64..f2978f56d 100755 --- a/fence/blueprints/data/indexd.py +++ b/fence/blueprints/data/indexd.py @@ -349,13 +349,12 @@ def init_multipart_upload(key, expires_in=None, bucket=None): Returns: uploadId(str) """ + bucket = bucket or flask.current_app.config["DATA_UPLOAD_BUCKET"] if not bucket: - try: - bucket = flask.current_app.config["DATA_UPLOAD_BUCKET"] - except KeyError: - raise InternalError( - "fence not configured with data upload bucket; can't create signed URL" - ) + raise InternalError( + "fence not configured with data upload bucket; can't create signed URL" + ) + s3_url = "s3://{}/{}".format(bucket, key) return S3IndexedFileLocation(s3_url).init_multipart_upload(expires_in)