From: Michael Fritch Date: Wed, 1 Apr 2020 21:51:43 +0000 (-0600) Subject: mgr/orch: fix python3 DeprecationWarning X-Git-Tag: v15.2.2~76^2~23 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=75e31bd19e8e270d28f79faf667bd7364d1697e0;p=ceph.git mgr/orch: fix python3 DeprecationWarning test_orchestrator/module.py:181: DeprecationWarning: invalid escape sequence \s patterns = ['-i\s(\w+)', '--id[\s=](\w+)'] Signed-off-by: Michael Fritch (cherry picked from commit f77defe55174d6f42a8a2d824c22530d11db4f7d) --- diff --git a/src/pybind/mgr/test_orchestrator/module.py b/src/pybind/mgr/test_orchestrator/module.py index f35321a3f05db..4fc125da33a18 100644 --- a/src/pybind/mgr/test_orchestrator/module.py +++ b/src/pybind/mgr/test_orchestrator/module.py @@ -178,7 +178,7 @@ class TestOrchestrator(MgrModule, orchestrator.Orchestrator): raise AssertionError('Fail to determine daemon type from {}'.format(p)) # parse daemon ID. Possible options: `-i `, `--id=`, `--id ` - patterns = ['-i\s(\w+)', '--id[\s=](\w+)'] + patterns = [r'-i\s(\w+)', r'--id[\s=](\w+)'] daemon_id = None for pattern in patterns: m = re.search(pattern, p)