prase: weather: use raw string for regex

This commit is contained in:
Rossen Georgiev 2022-03-12 14:27:29 +00:00
parent c9f4b4f779
commit 5e79c81035
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ def parse_weather_data(body):
return (body, parsed)
def parse_weather(body):
match = re.match("^(\d{8})c[\. \d]{3}s[\. \d]{3}g[\. \d]{3}t[\. \d]{3}", body)
match = re.match(r"^(\d{8})c[\. \d]{3}s[\. \d]{3}g[\. \d]{3}t[\. \d]{3}", body)
if not match:
raise ParseError("invalid positionless weather report format")