better return arguments
This commit is contained in:
parent
cc2aa5c1de
commit
e1ff89eb2d
|
@ -37,8 +37,10 @@ def put(bucket_name, region_name, prefix, data, encrypt, **kwargs):
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
bucket.put_object(Key=prefix, Body=data, ACL="bucket-owner-full-control")
|
bucket.put_object(Key=prefix, Body=data, ACL="bucket-owner-full-control")
|
||||||
|
return True
|
||||||
except ClientError:
|
except ClientError:
|
||||||
sentry.captureException()
|
sentry.captureException()
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
@sts_client("s3", service_type="client")
|
@sts_client("s3", service_type="client")
|
||||||
|
@ -55,6 +57,7 @@ def delete(bucket_name, prefix, **kwargs):
|
||||||
return response['ResponseMetadata']['HTTPStatusCode'] < 300
|
return response['ResponseMetadata']['HTTPStatusCode'] < 300
|
||||||
except ClientError:
|
except ClientError:
|
||||||
sentry.captureException()
|
sentry.captureException()
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
@sts_client("s3", service_type="client")
|
@sts_client("s3", service_type="client")
|
||||||
|
@ -69,3 +72,4 @@ def get(bucket_name, prefix, **kwargs):
|
||||||
return response['Body'].read().decode("utf-8")
|
return response['Body'].read().decode("utf-8")
|
||||||
except ClientError:
|
except ClientError:
|
||||||
sentry.captureException()
|
sentry.captureException()
|
||||||
|
return None
|
||||||
|
|
Loading…
Reference in New Issue