Fix syntax error in terminal_query.py (oops)