redo new logging

This commit is contained in:
Kevin Froman 2019-06-25 19:33:55 -05:00
parent a5a50a84d4
commit 0b34951423
2 changed files with 1 additions and 2 deletions

View File

@ -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:

View File

@ -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