From 938dadcae0a667ae7ba197d2efad056c0d39855f Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Wed, 13 Feb 2019 15:28:27 +0530 Subject: [PATCH] tor: Fix deprecation warning W605 for '\' character in regex Signed-off-by: Joseph Nuthalapati Reviewed-by: Sunil Mohan Adapa --- plinth/modules/tor/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plinth/modules/tor/forms.py b/plinth/modules/tor/forms.py index b209067ef..d8dbd508e 100644 --- a/plinth/modules/tor/forms.py +++ b/plinth/modules/tor/forms.py @@ -64,7 +64,7 @@ def bridges_validator(bridges): except IndexError: raise validation_error - match = re.match('\[([a-fA-F0-9:]+)\](?::([0-9]+))?', ip_port_part) + match = re.match(r'\[([a-fA-F0-9:]+)\](?::([0-9]+))?', ip_port_part) if match: ip_address = match.group(1) port = match.group(2)