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() |     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) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue