mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
linting
This commit is contained in:
@ -207,17 +207,16 @@ def parse(data, raw=False, quiet=False):
|
|||||||
tstamp = '-timestamp-' in line
|
tstamp = '-timestamp-' in line
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
||||||
# skip header rows
|
# skip header rows
|
||||||
if (procs or disk) and (line.startswith('procs') or line.startswith('disk')):
|
if (procs or disk) and (line.startswith('procs') or line.startswith('disk')):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if 'swpd' in line and 'free' in line and 'buff' in line and 'cache' in line:
|
if 'swpd' in line and 'free' in line and 'buff' in line and 'cache' in line:
|
||||||
buff_cache = True
|
buff_cache = True
|
||||||
tz = line.strip().split()[-1] if tstamp else None
|
tz = line.strip().split()[-1] if tstamp else None
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if '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
|
buff_cache = False
|
||||||
tz = line.strip().split()[-1] if tstamp else None
|
tz = line.strip().split()[-1] if tstamp else None
|
||||||
continue
|
continue
|
||||||
|
@ -167,7 +167,6 @@ def parse(data, raw=False, quiet=False, ignore_exceptions=False):
|
|||||||
tstamp = '-timestamp-' in line
|
tstamp = '-timestamp-' in line
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
||||||
# skip header rows
|
# skip header rows
|
||||||
if (procs or disk) and (line.startswith('procs') or line.startswith('disk')):
|
if (procs or disk) and (line.startswith('procs') or line.startswith('disk')):
|
||||||
continue
|
continue
|
||||||
|
Reference in New Issue
Block a user