From 13cceb6447aeea5ef5ffb83b82a8a421c0aafd96 Mon Sep 17 00:00:00 2001 From: Alex M Date: Thu, 21 Nov 2024 10:39:41 +0000 Subject: [PATCH] remove unused file system code --- scout/utils/storage/filesystem.py | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/scout/utils/storage/filesystem.py b/scout/utils/storage/filesystem.py index 8929d43..d972e9a 100644 --- a/scout/utils/storage/filesystem.py +++ b/scout/utils/storage/filesystem.py @@ -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, @@ -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...")