Also allow debug GET arg

This commit is contained in:
Eryn Wells 2017-09-30 14:17:30 -07:00
parent a6f90703fb
commit bb7f11846f

View file

@ -172,9 +172,12 @@ def hello():
next_board = board.move() next_board = board.move()
try: try:
debug = bool(int(os.environ.get('TTT_DEBUG', 0))) debug = int(os.environ.get('TTT_DEBUG', 0))
debug = int(request.args.get('debug', debug))
debug = bool(debug)
except ValueError: except ValueError:
debug = False debug = False
if debug: if debug:
import pprint import pprint
out = str(next_board) out = str(next_board)