From a60b7a8676a3e4f44c3a01345714bcf88b1d0148 Mon Sep 17 00:00:00 2001 From: Ari Kalfus Date: Fri, 8 Feb 2019 11:16:37 -0500 Subject: [PATCH] Let users choose AWS_SHARED_CREDENTIALS_FILE Use the .env in the repo by default, or use a separate file, by the user's choice. --- weirdAAL.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/weirdAAL.py b/weirdAAL.py index ebd955f..50ba9ee 100755 --- a/weirdAAL.py +++ b/weirdAAL.py @@ -17,7 +17,10 @@ import re from tabulate import tabulate import textwrap -os.environ['AWS_SHARED_CREDENTIALS_FILE'] = '.env' +# Let a user set .aws/credentials or another file as the credentials source +# If user-defined, must be an absolute path +if 'AWS_SHARED_CREDENTIALS_FILE' not in os.environ: + os.environ['AWS_SHARED_CREDENTIALS_FILE'] = '.env' # If you want to use a transparent + supports SSL proxy you can put it here # os.environ['HTTPS_PROXY'] = 'https://127.0.0.1:3128'