added error handling to telnet decode line
This commit is contained in:
parent
6d20452d6e
commit
8fb104240a
@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
name = colorspot
|
||||
version = 0.1.4
|
||||
version = 0.1.5
|
||||
author = Michael Clemens
|
||||
author_email = colorspot@qrz.is
|
||||
description = A colorful CLI DX cluster client with LotW integration
|
||||
|
@ -1,3 +1,3 @@
|
||||
from colorspot.__main__ import ColorSpot
|
||||
|
||||
__version__ = '0.1.4'
|
||||
__version__ = '0.1.5'
|
||||
|
@ -267,7 +267,11 @@ class ColorSpot():
|
||||
int(self.config['cluster']['timeout'])) as telnet:
|
||||
while True:
|
||||
line_enc = telnet.read_until(b"\n") # Read one line
|
||||
line = line_enc.decode('ascii')
|
||||
try:
|
||||
line = line_enc.decode('ascii')
|
||||
except:
|
||||
print("Error while encoding the following line:")
|
||||
print(line_enc)
|
||||
# Enters the call sign if requested
|
||||
if "enter your call" in line:
|
||||
b_user = str.encode(self.config['cluster']['user']+"\n")
|
||||
|
Loading…
Reference in New Issue
Block a user