redo new logging
This commit is contained in:
parent
a5a50a84d4
commit
0b34951423
@ -131,7 +131,7 @@ def raw(data, fd = sys.stdout, terminal = False):
|
|||||||
Outputs raw data to console without formatting
|
Outputs raw data to console without formatting
|
||||||
'''
|
'''
|
||||||
|
|
||||||
if (get_settings() & OUTPUT_TO_CONSOLE):
|
if terminal and (get_settings() & OUTPUT_TO_CONSOLE):
|
||||||
try:
|
try:
|
||||||
ts = fd.write('%s\n' % data)
|
ts = fd.write('%s\n' % data)
|
||||||
except OSError:
|
except OSError:
|
||||||
|
@ -19,7 +19,6 @@ def local_command(core_inst, command, data='', silent = True, post=False, postDa
|
|||||||
if data != '':
|
if data != '':
|
||||||
data = '&data=' + urllib.parse.quote_plus(data)
|
data = '&data=' + urllib.parse.quote_plus(data)
|
||||||
payload = 'http://%s/%s%s' % (hostname, command, data)
|
payload = 'http://%s/%s%s' % (hostname, command, data)
|
||||||
print(payload)
|
|
||||||
try:
|
try:
|
||||||
if post:
|
if post:
|
||||||
retData = requests.post(payload, data=postData, headers={'token': core_inst.config.get('client.webpassword'), 'Connection':'close'}, timeout=(maxWait, maxWait)).text
|
retData = requests.post(payload, data=postData, headers={'token': core_inst.config.get('client.webpassword'), 'Connection':'close'}, timeout=(maxWait, maxWait)).text
|
||||||
|
Loading…
Reference in New Issue
Block a user