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:
parent
bd73f0920d
commit
b988408166
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue