From bb7f11846fb586ae6364a3aacedd6e5f32d064ad Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 30 Sep 2017 14:17:30 -0700 Subject: [PATCH] Also allow debug GET arg --- tictactoe.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tictactoe.py b/tictactoe.py index faeea0c..8da01f0 100644 --- a/tictactoe.py +++ b/tictactoe.py @@ -172,9 +172,12 @@ def hello(): next_board = board.move() 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: debug = False + if debug: import pprint out = str(next_board)