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): def main(args, settings):
azure_storage_container_name = settings.get('AZURE_STORAGE_CONTAINER_NAME') azure_storage_container_name = settings.get('AZURE_STORAGE_CONTAINER_NAME')
azure_storage_connection_string = settings.get('AZURE_STORAGE_CONNECTION_STRING') azure_storage_connection_string = settings.get('AZURE_STORAGE_CONNECTION_STRING')
backup_dir = settings.get('BACKUP_DIR') backup_dir = settings.get('BACKUP_DIR')
timestamp = settings.get('TIMESTAMP') timestamp = settings.get('TIMESTAMP')
...@@ -17,7 +17,7 @@ def main(args, settings): ...@@ -17,7 +17,7 @@ def main(args, settings):
with open(archive_file, 'rb') as data: with open(archive_file, 'rb') as data:
container_client.upload_blob(data) container_client.upload_blob(data)
print("Upload to Azure Storage was successful") print("Upload to Azure Storage was successful")
except FileNotFoundError: except FileNotFoundError: # noqa: F821
print("The file was not found") print("The file was not found")
return False return False
except Exception as e: except Exception as e:
......
...@@ -19,7 +19,7 @@ def main(args, settings): ...@@ -19,7 +19,7 @@ def main(args, settings):
blob.upload_from_filename(archive_file) blob.upload_from_filename(archive_file)
print("Upload to gcs: was successful") print("Upload to gcs: was successful")
except FileNotFoundError: except FileNotFoundError: # noqa: F821
print("The file: {0} was not found".format(gcs_file_name)) print("The file: {0} was not found".format(gcs_file_name))
return False return False
except api_core.exceptions.Forbidden as e: except api_core.exceptions.Forbidden as e:
......
...@@ -32,7 +32,7 @@ def main(args, settings): ...@@ -32,7 +32,7 @@ def main(args, settings):
try: try:
s3_object.put(Body=open(archive_file, 'rb')) s3_object.put(Body=open(archive_file, 'rb'))
print("Upload to S3 was successful") print("Upload to S3 was successful")
except FileNotFoundError: except FileNotFoundError: # noqa: F821
print("The file was not found") print("The file was not found")
return False return False
except NoCredentialsError: 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