Add r string literal for regexps

This commit is contained in:
shortcutme 2019-07-01 16:24:23 +02:00
parent 43f833e604
commit 62401b24ec
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
4 changed files with 27 additions and 26 deletions

View file

@ -163,7 +163,7 @@ class TorManager(object):
# Version 0.2.7.5 required because ADD_ONION support
res_version = self.send("GETINFO version", conn)
version = re.search('version=([0-9\.]+)', res_version).group(1)
version = re.search(r'version=([0-9\.]+)', res_version).group(1)
assert float(version.replace(".", "0", 2)) >= 207.5, "Tor version >=0.2.7.5 required, found: %s" % version
self.setStatus("Connected (%s)" % res_auth)