|
|
|
|
@ -63,8 +63,9 @@ def read(**args) :
|
|
|
|
|
elif 'cmd' in args :
|
|
|
|
|
cmd = args['cmd']
|
|
|
|
|
if cmd :
|
|
|
|
|
handler = subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE)
|
|
|
|
|
stream = str(handler.communicate()[0]).replace("b'",'')
|
|
|
|
|
handler = subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE,encoding='utf-8')
|
|
|
|
|
stream = str(handler.communicate()[0]) #.decode('utf-8') #.replace("b'",'')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return _parser (stream) if _parser else stream
|
|
|
|
|
|
|
|
|
|
|