mirror of
https://github.com/coulisse/spiderweb.git
synced 2024-09-21 07:27:09 +00:00
managed unparsable string on telnet
This commit is contained in:
parent
ff3cee9a0b
commit
8d3ec856e9
@ -25,4 +25,4 @@ keywords:
|
||||
- spiderweb
|
||||
license: GPL-3.0
|
||||
version: v2.5.4
|
||||
date-released: 2024-03-30
|
||||
date-released: 2024-03-31
|
||||
|
@ -1,5 +1,5 @@
|
||||
### Change log
|
||||
Date: 30/03/2024
|
||||
Date: 31/03/2024
|
||||
Release: v2.5.4
|
||||
- tested with Python 3.12
|
||||
- replaced mysql driver with mariadb driver
|
||||
|
@ -12,6 +12,7 @@ def parse_who(lines):
|
||||
# create a list o lines and define the structure
|
||||
lines = lines.splitlines()
|
||||
|
||||
|
||||
row_headers = ("callsign", "type", "started", "name", "average_rtt", "link")
|
||||
|
||||
# skip first lines and last line
|
||||
@ -27,7 +28,8 @@ def parse_who(lines):
|
||||
|
||||
ln = len(second_part)
|
||||
|
||||
if ln > 10:
|
||||
try:
|
||||
if ln > 32:
|
||||
fields = [first_part.encode()] #adding callsign
|
||||
|
||||
if ln > 45:
|
||||
@ -47,6 +49,9 @@ def parse_who(lines):
|
||||
|
||||
payload.append(dict(zip(row_headers, fields)))
|
||||
|
||||
except Exception as e1:
|
||||
logging.error(e1)
|
||||
|
||||
return payload
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user