Skip to content

Commit

Permalink
remove unused file system code
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdzm committed Nov 21, 2024
1 parent ac07381 commit 13cceb6
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions scout/utils/storage/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,6 @@

load_dotenv()


class TypeAdapter:
def __init__(self, model):
self.model = model

def validate_python(self, data):
try:
return self.model(**data)
except ValidationError as e:
print(f"Validation error: {e}")
return None


class S3StorageHandler(BaseStorageHandler):
def __init__(
self,
Expand Down Expand Up @@ -62,11 +49,11 @@ def __init__(
# Create the bucket if it doesn't exist
try:
self.s3_client.create_bucket(Bucket=self.bucket_name)
print(f"Successfully created bucket: {self.bucket_name}")
logger.info(f"Successfully created bucket: {self.bucket_name}")
except self.s3_client.exceptions.BucketAlreadyOwnedByYou:
print(f"Bucket {self.bucket_name} already exists and is owned by you.")
logger.info(f"Bucket {self.bucket_name} already exists and is owned by you.")
except Exception as e:
print(f"Error creating bucket: {e}")
logger.error(f"Error creating bucket: {e}")
else:
# Use no authentication for production mode
logger.info("Connecting to S3...")
Expand Down

0 comments on commit 13cceb6

Please sign in to comment.