From e97bd9ab22c85e5d79b990040c753768dccdcf00 Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 23 May 2018 23:58:23 +0200 Subject: [PATCH] Typo in variable name: file --> source_file Should solve one undefined name in flake8 testing of https://github.com/carnal0wnage/weirdAAL on Python 3.6.3 $ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__ ``` ./libs/aws_lambda.py:135:86: F821 undefined name 'region' print("[-] GetAccountSettings allowed for {} but no results [-]" .format(region)) ^ ./libs/s3.py:289:54: F821 undefined name 'file' print("{} object does not exist.".format(file)) ^ 2 F821 undefined name 'region' 2 ``` --- libs/s3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/s3.py b/libs/s3.py index 844c653..c90df52 100644 --- a/libs/s3.py +++ b/libs/s3.py @@ -286,7 +286,7 @@ def s3_upload_file(bucket, source_file, dest_file): print("[-] {} not found [-]".format(source_file)) except botocore.exceptions.ClientError as e: if e.response['Error']['Code'] == "404": - print("{} object does not exist.".format(file)) + print("{} object does not exist.".format(source_file)) elif e.response['Error']['Code'] == 'InvalidClientTokenId': sys.exit("The AWS KEY IS INVALID. Exiting") elif e.response['Error']['Code'] == 'NotSignedUp':