Skip to content

Commit

Permalink
Print any possible exception when reading .env
Browse files Browse the repository at this point in the history
  • Loading branch information
jpadilla committed Jan 27, 2015
1 parent 9a9a0e2 commit 3b7a398
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions manage.py
Expand Up @@ -7,6 +7,7 @@

dotenv.read_dotenv()


if __name__ == "__main__":
ENVIRONMENT = os.getenv('ENVIRONMENT')

Expand Down
5 changes: 3 additions & 2 deletions project_name/wsgi.py
Expand Up @@ -11,8 +11,9 @@
try:
dotenv.read_dotenv(
os.path.join(os.path.dirname(os.path.dirname(__file__)), '.env'))
except:
pass
except Exception as e:
print(e)


ENVIRONMENT = os.getenv('ENVIRONMENT')

Expand Down

1 comment on commit 3b7a398

@johnjohndoe
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.