Skip to content

Commit

Permalink
Merge pull request #423 from ajiteshr7/patch-1
Browse files Browse the repository at this point in the history
Update config.py
  • Loading branch information
Matt Bernier authored Oct 27, 2017
2 parents f483a9b + 428a9ae commit 30d8b56
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions sendgrid/helpers/inbound/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@ def init_environment():
os.environ.get('VAR_NAME')"""
base_path = os.path.abspath(os.path.dirname(__file__))
if os.path.exists(base_path + '/.env'):
for line in open(base_path + '/.env'):
var = line.strip().split('=')
if len(var) == 2:
os.environ[var[0]] = var[1]
with open(base_path + '/.env') as f:
lines = f.readlines()
for line in lines:
var = line.strip().split('=')
if len(var) == 2:
os.environ[var[0]] = var[1]



@property
def debug_mode(self):
Expand Down

0 comments on commit 30d8b56

Please sign in to comment.