Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
refactor(scripts): move import into else branch
  • Loading branch information
philbooth committed Dec 14, 2018
1 parent 48d9c8f commit a0da419
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion import_counts.py
Expand Up @@ -23,11 +23,11 @@ def env_or_default(variable_name, default_value):

return default_value

aws = boto.provider.Provider("aws")
AWS_IAM_ROLE = env_or_default('AWS_IAM_ROLE', None)
if AWS_IAM_ROLE is not None:
CREDENTIALS="aws_iam_role={AWS_IAM_ROLE}".format(AWS_IAM_ROLE=AWS_IAM_ROLE)
else:
aws = boto.provider.Provider("aws")
AWS_ACCESS_KEY = env_or_default("AWS_ACCESS_KEY", aws.get_access_key())
AWS_SECRET_KEY = env_or_default("AWS_SECRET_KEY", aws.get_secret_key())
CREDENTIALS="aws_access_key_id={AWS_ACCESS_KEY};aws_secret_access_key={AWS_SECRET_KEY}".format(
Expand Down
2 changes: 1 addition & 1 deletion import_events.py
Expand Up @@ -23,11 +23,11 @@ def env_or_default(variable_name, default_value):

return default_value

aws = boto.provider.Provider("aws")
AWS_IAM_ROLE = env_or_default('AWS_IAM_ROLE', None)
if AWS_IAM_ROLE is not None:
CREDENTIALS="aws_iam_role={AWS_IAM_ROLE}".format(AWS_IAM_ROLE=AWS_IAM_ROLE)
else:
aws = boto.provider.Provider("aws")
AWS_ACCESS_KEY = env_or_default("AWS_ACCESS_KEY", aws.get_access_key())
AWS_SECRET_KEY = env_or_default("AWS_SECRET_KEY", aws.get_secret_key())
CREDENTIALS="aws_access_key_id={AWS_ACCESS_KEY};aws_secret_access_key={AWS_SECRET_KEY}".format(
Expand Down

0 comments on commit a0da419

Please sign in to comment.