Skip to content

Commit fbcb64c

Browse files
committed
Revert changes to indexd data blueprint
1 parent 3839a4d commit fbcb64c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

fence/blueprints/data/indexd.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,12 @@ def init_multipart_upload(key, expires_in=None, bucket=None):
349349
Returns:
350350
uploadId(str)
351351
"""
352+
bucket = bucket or flask.current_app.config["DATA_UPLOAD_BUCKET"]
352353
if not bucket:
353-
try:
354-
bucket = flask.current_app.config["DATA_UPLOAD_BUCKET"]
355-
except KeyError:
356-
raise InternalError(
357-
"fence not configured with data upload bucket; can't create signed URL"
358-
)
354+
raise InternalError(
355+
"fence not configured with data upload bucket; can't create signed URL"
356+
)
357+
359358
s3_url = "s3://{}/{}".format(bucket, key)
360359
return S3IndexedFileLocation(s3_url).init_multipart_upload(expires_in)
361360

0 commit comments

Comments
 (0)