diff --git a/medusa/storage/s3_base_storage.py b/medusa/storage/s3_base_storage.py index 5da0324b..818b37bd 100644 --- a/medusa/storage/s3_base_storage.py +++ b/medusa/storage/s3_base_storage.py @@ -217,7 +217,6 @@ def _consolidate_credentials(config) -> CensoredCredentials: session.set_config_variable('credentials_file', config.key_file) boto_credentials = session.get_credentials() - return CensoredCredentials( access_key_id=boto_credentials.access_key, secret_access_key=boto_credentials.secret_key, diff --git a/tests/storage/s3_storage_test.py b/tests/storage/s3_storage_test.py index 363919eb..a80d0945 100644 --- a/tests/storage/s3_storage_test.py +++ b/tests/storage/s3_storage_test.py @@ -80,19 +80,19 @@ def test_credentials_from_env_without_profile(self): os.environ["AWS_SECRET_ACCESS_KEY"] = "secret-from-env" config = AttributeDict({ - "api_profile": None, - "region": "region-from-config", - "storage_provider": "s3_us_west_oregon", - "key_file": empty_file.name, - "concurrent_transfers": "1", + 'api_profile': None, + 'region': 'region-from-config', + 'storage_provider': 's3_us_west_oregon', + 'key_file': empty_file.name, + 'concurrent_transfers': '1', }) credentials = S3BaseStorage._consolidate_credentials(config) - self.assertEqual("key-from-env", credentials.access_key_id) - self.assertEqual("region-from-config", credentials.region) + self.assertEqual('key-from-env', credentials.access_key_id) + self.assertEqual('region-from-config', credentials.region) - del os.environ["AWS_ACCESS_KEY_ID"] - del os.environ["AWS_SECRET_ACCESS_KEY"] + del os.environ['AWS_ACCESS_KEY_ID'] + del os.environ['AWS_SECRET_ACCESS_KEY'] def test_credentials_from_file(self): credentials_file_content = """