Use raw bytes literals for regexp.

Fixes `SyntaxWarning: invalid escape sequence '\.' `.
This commit is contained in:
Jakub Gocławski 2024-05-28 15:32:56 +02:00
commit bd2aaa7559
No known key found for this signature in database
GPG key ID: DB23479BBC13E2A3

View file

@ -4,9 +4,9 @@ from routeros_api import exceptions
from routeros_api import query
response_re = re.compile(b'^!(re|trap|fatal|done)$')
attribute_re = re.compile(b'^=([^=]+)=(.*)$', re.DOTALL)
tag_re = re.compile(b'^\.tag=(.*)$')
response_re = re.compile(rb'^!(re|trap|fatal|done)$')
attribute_re = re.compile(rb'^=([^=]+)=(.*)$', re.DOTALL)
tag_re = re.compile(rb'^\.tag=(.*)$')
class ResponseSentence(object):