]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: use raw string during `re.search` 36757/head
authorMichael Fritch <mfritch@suse.com>
Fri, 21 Aug 2020 16:03:05 +0000 (10:03 -0600)
committerMichael Fritch <mfritch@suse.com>
Fri, 21 Aug 2020 16:03:05 +0000 (10:03 -0600)
cephadmservice.py:348: DeprecationWarning: invalid escape sequence \:
    port = re.search('\:\d+\/', end_point)

Signed-off-by: Michael Fritch <mfritch@suse.com>
src/pybind/mgr/cephadm/services/cephadmservice.py

index c42cc121d61fcda4e8425d2791c34d28de6acb37..06417d5ad938de3b24cca5c95b70a25f3456afec 100644 (file)
@@ -343,7 +343,7 @@ class MgrService(CephadmService):
         if mgr_services:
             mgr_endpoints = json.loads(mgr_services)
             for end_point in mgr_endpoints.values():
-                port = re.search('\:\d+\/', end_point)
+                port = re.search(r'\:\d+\/', end_point)
                 if port:
                     ports.append(int(port[0][1:-1]))