1
0

json-friendly debug messages. fix #659

This commit is contained in:
ThomasV
2014-04-17 17:20:07 +02:00
parent 3e1a87397d
commit 696766c370
3 changed files with 7 additions and 3 deletions

View File

@@ -17,8 +17,12 @@ def set_verbosity(b):
global is_verbose
is_verbose = b
def print_error(*args):
if not is_verbose: return
print_stderr(*args)
def print_stderr(*args):
args = [str(item) for item in args]
sys.stderr.write(" ".join(args) + "\n")
sys.stderr.flush()