]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/orch: fix python3 DeprecationWarning 34357/head
authorMichael Fritch <mfritch@suse.com>
Wed, 1 Apr 2020 21:51:43 +0000 (15:51 -0600)
committerMichael Fritch <mfritch@suse.com>
Wed, 1 Apr 2020 21:54:30 +0000 (15:54 -0600)
test_orchestrator/module.py:181: DeprecationWarning: invalid escape sequence \s
    patterns = ['-i\s(\w+)', '--id[\s=](\w+)']

Signed-off-by: Michael Fritch <mfritch@suse.com>
src/pybind/mgr/test_orchestrator/module.py

index f35321a3f05dbe56e4f23b0a385549158e2db1b2..4fc125da33a18882fca73504f3cb2301f6f2745e 100644 (file)
@@ -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=<id>`, `--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)