Skip to content
Snippets Groups Projects
Commit 95eed5a6 authored by Felix Sperling's avatar Felix Sperling
Browse files

ignore wrong linter errors

parent 63828c6b
No related branches found
No related tags found
No related merge requests found
from azure.storage.blob import BlobServiceClient, BlobClient
from azure.storage.blob import BlobServiceClient
def main(args, settings):
azure_storage_container_name = settings.get('AZURE_STORAGE_CONTAINER_NAME')
azure_storage_connection_string = settings.get('AZURE_STORAGE_CONNECTION_STRING')
backup_dir = settings.get('BACKUP_DIR')
timestamp = settings.get('TIMESTAMP')
......@@ -17,7 +17,7 @@ def main(args, settings):
with open(archive_file, 'rb') as data:
container_client.upload_blob(data)
print("Upload to Azure Storage was successful")
except FileNotFoundError:
except FileNotFoundError: # noqa: F821
print("The file was not found")
return False
except Exception as e:
......
......@@ -19,7 +19,7 @@ def main(args, settings):
blob.upload_from_filename(archive_file)
print("Upload to gcs: was successful")
except FileNotFoundError:
except FileNotFoundError: # noqa: F821
print("The file: {0} was not found".format(gcs_file_name))
return False
except api_core.exceptions.Forbidden as e:
......
......@@ -32,7 +32,7 @@ def main(args, settings):
try:
s3_object.put(Body=open(archive_file, 'rb'))
print("Upload to S3 was successful")
except FileNotFoundError:
except FileNotFoundError: # noqa: F821
print("The file was not found")
return False
except NoCredentialsError:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment