Skip to content

Commit 660b9b7

Browse files
authored
Merge pull request #49 from Cosmo-Tech/LAL/oops_i_did_it_again
Lal/oops i did it again
2 parents 8680404 + 5b59a73 commit 660b9b7

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

cosmotech/coal/cli/commands/s3_bucket_delete.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,5 @@ def s3_bucket_delete(
106106
LOGGER.info(f'Deleting {boto_objects}')
107107
boto_delete_request = {'Objects': boto_objects}
108108
bucket.delete_objects(Delete=boto_delete_request)
109+
else:
110+
LOGGER.info('No objects to delete')

cosmotech/coal/cli/commands/s3_bucket_upload.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def s3_bucket_upload(
9898
9999
Make use of the boto3 library to access the bucket
100100
101-
More information is available on this page:
101+
More information is available on this page:
102102
[https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html)
103103
"""
104104
source_path = pathlib.Path(source_folder)
@@ -115,12 +115,12 @@ def s3_bucket_upload(
115115
if ssl_cert_bundle:
116116
boto3_parameters["verify"] = ssl_cert_bundle
117117

118-
s3_client = boto3.client("s3", **boto3_parameters)
118+
s3_resource = boto3.resource("s3", **boto3_parameters)
119119

120120
def file_upload(file_path: pathlib.Path, file_name: str):
121121
uploaded_file_name = file_prefix + file_name
122122
LOGGER.info(f"Sending {file_path} as {uploaded_file_name}")
123-
s3_client.upload_file(file_path, bucket_name, uploaded_file_name)
123+
s3_resource.Bucket(bucket_name).upload_file(file_path, uploaded_file_name)
124124

125125
if source_path.is_dir():
126126
_source_name = str(source_path)

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ redisgraph_bulk_loader==0.10.2
1717
cosmotech-api~=3.2
1818

1919
# Commands requirements
20-
boto3~=1.34
20+
boto3~=1.35.19
2121
requests~=2.32.3
2222
singlestoredb~=1.10.0
2323

0 commit comments

Comments
 (0)