Skip to content

Commit

Permalink
unneeded method
Browse files Browse the repository at this point in the history
  • Loading branch information
Wiessfelt, Katie committed Sep 19, 2024
1 parent b9a50f4 commit 4d004a0
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions castle/cms/files/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,3 @@ def create_if_not_exists(bucket, key, content_type, data, content_disposition=No
data,
content_disposition=content_disposition,
make_public=make_public)

def s3_obj_exists(bucket, key):
try:
# does a head request for a single key, will throw an error
# if not found (or elsewise)
bucket.Object(key).load()
return True
except botocore.exceptions.ClientError:
return False

0 comments on commit 4d004a0

Please sign in to comment.