mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
improve linux/bsd check
This commit is contained in:
@ -108,7 +108,7 @@ import jc.utils
|
||||
|
||||
|
||||
class info():
|
||||
version = '1.1'
|
||||
version = '1.2'
|
||||
description = 'ping command parser'
|
||||
author = 'Kelly Brazil'
|
||||
author_email = 'kellyjonbrazil@gmail.com'
|
||||
@ -496,7 +496,7 @@ def parse(data, raw=False, quiet=False):
|
||||
|
||||
if jc.utils.has_data(data):
|
||||
|
||||
if 'time' in data.splitlines()[-2] or 'time' in data.splitlines()[-3]:
|
||||
if ' time ' in data.splitlines()[-2] or ' time ' in data.splitlines()[-3]:
|
||||
raw_output = linux_parse(data)
|
||||
else:
|
||||
raw_output = bsd_parse(data)
|
||||
|
Reference in New Issue
Block a user