Fix with processes that don't exist

master
Steve L. Nyemba 8 years ago
parent 43b93abd54
commit f63bc18cfc

@ -125,8 +125,10 @@ class DetailProcess(Analysis):
cmd = "ps -eo pmem,pcpu,vsize,comm|grep :app$"
handler = subprocess.Popen(cmd.replace(":app",name),shell=True,stdout=subprocess.PIPE)
ostream = handler.communicate()[0].split('\n')
ostream = [ row.split(' ') for row in ostream if row != '']
ostream = [ row.split(' ') for row in ostream if row != '']
if len(ostream) == 0:
ostream = [['0','0','0',name]]
r = []
for row in ostream :
#

Loading…
Cancel
Save