1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-13 01:20:24 +02:00

fix output for non-extended

This commit is contained in:
Kelly Brazil
2020-03-01 17:38:51 -08:00
parent afe55b6af0
commit bc838eda59

View File

@ -19,7 +19,7 @@ Examples:
},
{
"user": "joeuser",
"writeable_tty": "?",
"writeable_tty": "-",
"tty": "console",
"time": "Feb 7 23:32",
"idle": "old",
@ -36,7 +36,7 @@ Examples:
},
{
"user": "joeuser",
"writeable_tty": "+",
"writeable_tty": "?",
"tty": "ttys003",
"time": "Feb 28 08:59",
"idle": "01:36",
@ -62,7 +62,7 @@ Examples:
},
{
"user": "joeuser",
"writeable_tty": "?",
"writeable_tty": "-",
"tty": "console",
"time": "Feb 7 23:32",
"idle": "old",
@ -79,7 +79,7 @@ Examples:
},
{
"user": "joeuser",
"writeable_tty": "+",
"writeable_tty": "?",
"tty": "ttys003",
"time": "Feb 28 08:59",
"idle": "01:36",
@ -246,6 +246,7 @@ def parse(data, raw=False, quiet=False):
# if just one more field, then it's the remote IP
if len(linedata) == 1:
output_line['from'] = linedata[0].replace('(', '').replace(')', '')
raw_output.append(output_line)
continue
# extended info: idle