Also allow debug GET arg
This commit is contained in:
		
							parent
							
								
									a6f90703fb
								
							
						
					
					
						commit
						bb7f11846f
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		|  | @ -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) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue