mirror of
https://gitea.smigz.com/smiggiddy/s3_cleanup.git
synced 2024-12-25 12:40:44 -05:00
fix: replace logging with print
This commit is contained in:
parent
769c8f0304
commit
8a1cb6b646
1 changed files with 1 additions and 3 deletions
4
main.py
4
main.py
|
@ -3,13 +3,11 @@ import boto
|
||||||
import boto.s3.connection
|
import boto.s3.connection
|
||||||
import datetime as dt
|
import datetime as dt
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
import logging
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
|
||||||
|
|
||||||
def get_s3_bucket(bucketname: str, host: str):
|
def get_s3_bucket(bucketname: str, host: str):
|
||||||
"""returns bucket object based
|
"""returns bucket object based
|
||||||
|
|
||||||
|
@ -68,7 +66,7 @@ def delete_keys(keys_to_delete: list, bucket):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
for k in keys_to_delete:
|
for k in keys_to_delete:
|
||||||
logging.info(f"Deleting key {k.name}")
|
print(f"Deleting key {k.name}")
|
||||||
bucket.delete_key(k)
|
bucket.delete_key(k)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue