Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use os.getenv's default values #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

42B
Copy link

@42B 42B commented Oct 26, 2018

Checklist

  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the [Contribution Guide] and my PR follows them.
  • I updated my branch with the master branch.

Short description of what this PR does:

  • Use os.getenv's default values (this also conforms to Python's preference of EAFP over LBYL)

krampus/krampus.py

Lines 55 to 58 in 738f006

if os.getenv("DEFAULT_REGION"):
region = os.getenv("DEFAULT_REGION")
else:
region = "us-east-1"

>>> os.getenv("DEFAULT_REGION", "us-east-1")
'us-east-1'

krampus/krampus.py

Lines 67 to 70 in 738f006

if os.getenv("ARN_WHITELIST"):
whitelist = os.getenv("ARN_WHITELIST")
else:
whitelist = None

>>> os.getenv("ARN_WHITELIST") is None
True

@SendGridDX
Copy link

SendGridDX commented Oct 26, 2018

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants