Skip to content

Commit

Permalink
Add a try exception for a unicode decode error
Browse files Browse the repository at this point in the history
  • Loading branch information
mbridak committed Dec 12, 2024
1 parent abea88a commit 326c56d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Changelog

- [24-12-12] Add a try exception for a unicode decode error.
- [24-12-11-1] Add RTC to RAC Canada Day, ARRL VHF, ARRL Field Day, ARRL SS, ARRL DX, 10 10
- [24-12-11] Add RTC to IARU HF, IARU Field Day, DARC XMAS, CQ WW, CQ WPX
- [24-12-9] Add RTC to Winter Field Day, Stew Perry, REF, RAEM, NAQP, LZ-DX, JIDX
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ generated, 'cause I'm lazy, list of those who've submitted PR's.

## Recent Changes (Polishing the Turd)

- [24-12-12] Add a try exception for a unicode decode error.
- [24-12-11-1] Add RTC to RAC Canada Day, ARRL VHF, ARRL Field Day, ARRL SS, ARRL DX, 10 10
- [24-12-11] Add RTC to IARU HF, IARU Field Day, DARC XMAS, CQ WW, CQ WPX
- [24-12-9] Add RTC to Winter Field Day, Stew Perry, REF, RAEM, NAQP, LZ-DX, JIDX
Expand Down
6 changes: 4 additions & 2 deletions not1mm/lib/cat_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def __check_sane_ip(self, ip: str) -> bool:
def __initialize_rigctrld(self):
try:
self.rigctrlsocket = socket.socket()
self.rigctrlsocket.settimeout(0.2)
self.rigctrlsocket.settimeout(0.5)
self.rigctrlsocket.connect((self.host, self.port))
logger.debug("Connected to rigctrld")
self.online = True
Expand All @@ -146,12 +146,14 @@ def __get_serial_string(self):
"""Gets any serial data waiting"""
dump = ""
thegrab = ""
self.rigctrlsocket.settimeout(0.1)
try:
while True:
thegrab += self.rigctrlsocket.recv(1024).decode()
dump += thegrab
except socket.error:
except (socket.error, UnicodeDecodeError):
...
self.rigctrlsocket.settimeout(0.5)
return dump

def sendcw(self, texttosend):
Expand Down
2 changes: 1 addition & 1 deletion not1mm/lib/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""It's the version"""

__version__ = "24.12.11.1"
__version__ = "24.12.12"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "not1mm"
version = "24.12.11.1"
version = "24.12.12"
description = "NOT1MM Logger"
readme = "README.md"
requires-python = ">=3.9"
Expand Down

0 comments on commit 326c56d

Please sign in to comment.