managed unparsable string on telnet

This commit is contained in:
coulisse 2024-03-31 18:57:35 +02:00
parent ff3cee9a0b
commit 8d3ec856e9
3 changed files with 23 additions and 18 deletions

View File

@ -25,4 +25,4 @@ keywords:
- spiderweb
license: GPL-3.0
version: v2.5.4
date-released: 2024-03-30
date-released: 2024-03-31

View File

@ -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

View File

@ -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