From 0b34951423952ebfe7dce8e2f1d0dcd5585c7c76 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Tue, 25 Jun 2019 19:33:55 -0500 Subject: [PATCH] redo new logging --- onionr/logger.py | 2 +- onionr/onionrutils/localcommand.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/onionr/logger.py b/onionr/logger.py index 1f65d0d4..01ada8ce 100755 --- a/onionr/logger.py +++ b/onionr/logger.py @@ -131,7 +131,7 @@ def raw(data, fd = sys.stdout, terminal = False): Outputs raw data to console without formatting ''' - if (get_settings() & OUTPUT_TO_CONSOLE): + if terminal and (get_settings() & OUTPUT_TO_CONSOLE): try: ts = fd.write('%s\n' % data) except OSError: diff --git a/onionr/onionrutils/localcommand.py b/onionr/onionrutils/localcommand.py index 6b5356ee..c3bf3ceb 100644 --- a/onionr/onionrutils/localcommand.py +++ b/onionr/onionrutils/localcommand.py @@ -19,7 +19,6 @@ def local_command(core_inst, command, data='', silent = True, post=False, postDa if data != '': data = '&data=' + urllib.parse.quote_plus(data) payload = 'http://%s/%s%s' % (hostname, command, data) - print(payload) try: if post: retData = requests.post(payload, data=postData, headers={'token': core_inst.config.get('client.webpassword'), 'Connection':'close'}, timeout=(maxWait, maxWait)).text