From 8a3a677c070d3a16227062985997e8159b20bc5b Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Sat, 28 Jan 2017 23:22:21 +0200 Subject: [PATCH] fix parsing of message ACK/REJ; #23 --- aprslib/parsing/message.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aprslib/parsing/message.py b/aprslib/parsing/message.py index 659dade..e9c1ee6 100644 --- a/aprslib/parsing/message.py +++ b/aprslib/parsing/message.py @@ -73,7 +73,7 @@ def parse_message(body): logger.debug("Packet is just a regular message") parsed.update({'format': 'message'}) - match = re.findall(r"^(ack|rej)\{([0-9]{1,5})$", body) + match = re.findall(r"^(ack|rej)([0-9]{1,5})$", body) if match: response, number = match[0] @@ -84,7 +84,7 @@ def parse_message(body): else: body = body[0:70] - match = re.findall(r"\{([0-9]{1,5})$", body) + match = re.findall(r"([0-9]{1,5})$", body) if match: msgid = match[0] body = body[:len(body) - 1 - len(msgid)]