mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-19 00:17:51 +02:00
fix process table detection
This commit is contained in:
@ -528,7 +528,7 @@ def parse(
|
|||||||
|
|
||||||
if jc.utils.has_data(data):
|
if jc.utils.has_data(data):
|
||||||
|
|
||||||
for line in filter(None, data.splitlines()):
|
for line in data.splitlines():
|
||||||
if line.startswith('top - '):
|
if line.startswith('top - '):
|
||||||
if item_obj:
|
if item_obj:
|
||||||
if process_list:
|
if process_list:
|
||||||
@ -599,12 +599,11 @@ def parse(
|
|||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if line.startswith(' PID '):
|
if not process_table and line == '':
|
||||||
process_table = True
|
process_table = True
|
||||||
process_list.append(line)
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if process_table:
|
if process_table and not line == '':
|
||||||
process_list.append(line)
|
process_list.append(line)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user