tor: Fix deprecation warning W605 for '\' character in regex

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Joseph Nuthalapati 2019-02-13 15:28:27 +05:30 committed by Sunil Mohan Adapa
parent bc6ce14cdb
commit 938dadcae0
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -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)