Merge pull request #130 from BOSWatch/fix-111

fix IndexError: list index out of range in sdr input routine (pocsagDecoder) #111
This commit is contained in:
Bastian Schroll 2025-06-27 19:31:42 +02:00 committed by GitHub
commit e130555b8b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -40,7 +40,7 @@ class PocsagDecoder:
if re.search("[0-9]{7}", ric) and re.search("[1-4]", subric): if re.search("[0-9]{7}", ric) and re.search("[1-4]", subric):
if "Alpha:" in data: if "Alpha:" in data:
message = data.split('Alpha: ')[1].strip() message = data.split('Alpha:')[1].strip()
message = message.replace('<NUL>', '').replace('<NUL', '').replace('< NUL>', '').replace('<EOT>', '').strip() message = message.replace('<NUL>', '').replace('<NUL', '').replace('< NUL>', '').replace('<EOT>', '').strip()
else: else:
message = "" message = ""