diff options
author | 2018-02-06 14:40:19 +0000 | |
---|---|---|
committer | 2018-02-06 14:40:19 +0000 | |
commit | bb86a6e537e8f556323f505ee3f5d62f84e416ec (patch) | |
tree | d95873ac7c8130a581a49b9dd1c4c403f70c02f8 | |
parent | snekchek (diff) |
Use .get() for environs
-rw-r--r-- | pysite/route_manager.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pysite/route_manager.py b/pysite/route_manager.py index 142882e6..b71dea2f 100644 --- a/pysite/route_manager.py +++ b/pysite/route_manager.py @@ -11,10 +11,10 @@ from pysite.base_route import BaseView, ErrorView, RouteView __author__ = "Gareth Coles" -DB_HOST = os.environ["RETHINKDB_HOST"] -DB_PORT = os.environ["RETHINKDB_PORT"] -DB_DATABASE = os.environ["RETHINKDB_DATABASE"] -DB_TABLE = os.environ["RETHINKDB_TABLE"] +DB_HOST = os.environ.get("RETHINKDB_HOST") +DB_PORT = os.environ.get("RETHINKDB_PORT") +DB_DATABASE = os.environ.get("RETHINKDB_DATABASE") +DB_TABLE = os.environ.get("RETHINKDB_TABLE") class RouteManager: |