bug fixed
This commit is contained in:
parent
2f2797b508
commit
e20df99b01
|
@ -44,10 +44,10 @@ class Proc:
|
|||
execlist = []
|
||||
out, err = Popen(['/bin/ps', '-eo', 'pid,args'], stdout=PIPE, stderr=PIPE).communicate()
|
||||
for line in out.splitlines():
|
||||
execpid = line.split(b' ')[0].decode('utf-8')
|
||||
exepath = line.split(b' ')[1].decode('utf-8')
|
||||
execpid = line.split()[0].decode('utf-8')
|
||||
exepath = line.split()[1].decode('utf-8')
|
||||
exename = path.basename(exepath)
|
||||
cmdline = line.split(b' ', 1)[1].decode('utf-8')
|
||||
cmdline = line.split(None, 1)[1].decode('utf-8')
|
||||
if execpid and exename:
|
||||
execlist.append({'execpid': execpid, 'exename': exename, 'exepath': exepath, 'cmdline': cmdline})
|
||||
return execlist
|
||||
|
|
Loading…
Reference in New Issue
Block a user