trx_toolkit/fake_trx.py: use raw string notation for regex

This way there is no need to escape backslashes in regex.

Change-Id: I1b2b6675851275bd5285ffc287410535b22055ae
This commit is contained in:
Vadim Yanitskiy 2021-05-03 02:02:04 +02:00
parent bd73f0920d
commit b988408166
1 changed files with 1 additions and 1 deletions

View File

@ -483,7 +483,7 @@ class Application(ApplicationBase):
@staticmethod
def trx_def(val):
try:
result = re.match("(.+@)?(.+):([0-9]+)(\/[0-9]+)?", val)
result = re.match(r"(.+@)?(.+):([0-9]+)(/[0-9]+)?", val)
(name, addr, port, idx) = result.groups()
except:
raise argparse.ArgumentTypeError("Invalid TRX definition: %s" % val)