Skip to content

Commit

Permalink
Handle env values better
Browse files Browse the repository at this point in the history
  • Loading branch information
ftsalamp committed May 17, 2018
1 parent 2e491a1 commit 0118858
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions web_monitoring/diffing_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@


client = tornado.httpclient.AsyncHTTPClient()
debug_mode = (os.environ['DIFFING_SERVER_DEBUG'] == 'True')

DEBUG_MODE = os.environ.get('DIFFING_SERVER_DEBUG', 'False').strip().lower() == 'true'

class DiffHandler(tornado.web.RequestHandler):
# subclass must define `differs` attribute
Expand Down Expand Up @@ -235,7 +234,7 @@ class BoundDiffHandler(DiffHandler):
return tornado.web.Application([
(r"/([A-Za-z0-9_]+)", BoundDiffHandler),
(r"/", IndexHandler),
], debug=debug_mode)
], debug=DEBUG_MODE)

def start_app(port):
app = make_app()
Expand Down

0 comments on commit 0118858

Please sign in to comment.