From 640b0685cd795c03b571b3ca26fc9030b86c4f99 Mon Sep 17 00:00:00 2001 From: Alex Schofield Date: Tue, 20 Aug 2024 00:18:16 +0100 Subject: fix(extract_lambda): fix UnboundLocalError when db is called before it is assigned a value --- src/extract_lambda.py | 1 + 1 file changed, 1 insertion(+) (limited to 'src/extract_lambda.py') diff --git a/src/extract_lambda.py b/src/extract_lambda.py index 8575b08..7efaac0 100644 --- a/src/extract_lambda.py +++ b/src/extract_lambda.py @@ -29,6 +29,7 @@ def lambda_handler(event, context): and converts all tables to CSV and if any of those tables do not exist in, or are different to the ones in s3, it uploads them it uses 3 helper functions to achieve these 3 functionalities """ + db = None try: db = connect_to_database() existing_files = list_existing_s3_files() -- cgit v1.2.3