1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-15 01:24:29 +02:00
This commit is contained in:
Kelly Brazil
2021-09-24 08:52:39 -07:00
parent a4d45b653f
commit 486282b985

View File

@ -155,12 +155,12 @@ def parse(data, raw=False, quiet=False, ignore_exceptions=False):
# detect output type
if not procs and not disk and line.startswith('procs'):
procs = True
tstamp = True if '-timestamp-' in line else False
tstamp = '-timestamp-' in line
continue
if not procs and not disk and line.startswith('disk'):
disk = True
tstamp = True if '-timestamp-' in line else False
tstamp = '-timestamp-' in line
continue
@ -170,7 +170,7 @@ def parse(data, raw=False, quiet=False, ignore_exceptions=False):
tz = line.strip().split()[-1] if tstamp else None
continue
elif 'swpd' in line and 'free' in line and 'inact' in line and 'active' in line:
if 'swpd' in line and 'free' in line and 'inact' in line and 'active' in line:
buff_cache = False
tz = line.strip().split()[-1] if tstamp else None
continue