From 2599760bebbe182331bc5bdf18b21080bc00a707 Mon Sep 17 00:00:00 2001 From: pedrojmendoza Date: Mon, 1 Jul 2019 15:30:08 +0200 Subject: [PATCH] Using Python 2 string formatting As part of https://github.com/aws-quickstart/quickstart-git2s3/pull/33, a Python 3 only string formatting mechanism was introduced (https://realpython.com/python-f-strings/) but the CFN template is still using python2.7 as runtime for the lambdas hence a SyntaxError is happening --- functions/source/ZipDl/lambda_function.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/source/ZipDl/lambda_function.py b/functions/source/ZipDl/lambda_function.py index 74193bc..e8c6b0e 100644 --- a/functions/source/ZipDl/lambda_function.py +++ b/functions/source/ZipDl/lambda_function.py @@ -95,7 +95,7 @@ def lambda_handler(event, context): archive_root = event['body-json']['project']['http_url'].strip('.git') project_id = event['body-json']['project_id'] branch = event['body-json']['ref'].replace('refs/heads/', '') - archive_url = f"https://gitlab.com/api/v4/projects/{project_id}/repository/archive.zip" + archive_url = "https://gitlab.com/api/v4/projects/{}/repository/archive.zip".format(project_id) params = {'private_token': OAUTH_token, 'sha': branch} owner = event['body-json']['project']['namespace']