krampus icon indicating copy to clipboard operation
krampus copied to clipboard

Use os.getenv's default values

Open 42B opened this issue 6 years ago • 1 comments

Checklist

  • [x] I have made a material change to the repo (functionality, testing, spelling, grammar)
  • [x] I have read the [Contribution Guide] and my PR follows them.
  • [x] 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)

https://github.com/sendgrid/krampus/blob/738f00652abc93302db5b1205ab3ba45f2507463/krampus.py#L55-L58

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

https://github.com/sendgrid/krampus/blob/738f00652abc93302db5b1205ab3ba45f2507463/krampus.py#L67-L70

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

42B avatar Oct 26 '18 21:10 42B

这个 pr 只是把 commit 从 contrib 里搬过来了还是又加了别的东西啊?

pendoragon avatar Apr 21 '17 06:04 pendoragon

@pendoragon 主要是迁移了aliyun的 controller。 然后提升了 nginx controller 的功能。

然后修复了一些bug

kdada avatar Apr 21 '17 06:04 kdada

@zoumo

ddysher avatar Apr 24 '17 06:04 ddysher

LGTM

zoumo avatar May 31 '17 02:05 zoumo