From 870da5a5c6a19ce4886689a61cf7d2825e259cab Mon Sep 17 00:00:00 2001 From: Chris Busillo Date: Tue, 17 Dec 2024 14:11:28 -0500 Subject: [PATCH] convert str to raw str for escape sequence passed to regex --- printnodeapi/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/printnodeapi/auth.py b/printnodeapi/auth.py index 454ad71..4b4a710 100644 --- a/printnodeapi/auth.py +++ b/printnodeapi/auth.py @@ -119,7 +119,7 @@ def _request(self, method, endpoint, fields=None, request_headers=None): raise Exception('status code: ' + str(response.status_code)) def _is_hundreth(self, hundreth, number): - pattern = str(hundreth) + '\d{2,}' + pattern = str(hundreth) + r'\d{2,}' return bool(re.match(pattern, str(number))) def _fix_unicode(self, json_object):