This commit is contained in:
parent
6956f49192
commit
d6c268dc0e
3 changed files with 7 additions and 4 deletions
|
@ -29,9 +29,12 @@ def parse_freebsd(content):
|
|||
else:
|
||||
if current_section:
|
||||
result[current_section] += line + "\n"
|
||||
for section in result:
|
||||
print(" parsing {}...".format(section))
|
||||
if section in ["interfaces"]:
|
||||
result[section] = loads(result[section])
|
||||
from pprint import pprint
|
||||
#pprint(result)
|
||||
result["ip"] = parse_ip(result["interfaces"])
|
||||
result["os"] = loads(result["version"])
|
||||
return result
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue