From ed0074da2ca00b3fc1669865667e1090d9676fbe Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Fri, 21 Aug 2020 10:03:05 -0600 Subject: [PATCH] mgr/cephadm: use raw string during `re.search` cephadmservice.py:348: DeprecationWarning: invalid escape sequence \: port = re.search('\:\d+\/', end_point) Signed-off-by: Michael Fritch --- src/pybind/mgr/cephadm/services/cephadmservice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/cephadm/services/cephadmservice.py b/src/pybind/mgr/cephadm/services/cephadmservice.py index c42cc121d61fc..06417d5ad938d 100644 --- a/src/pybind/mgr/cephadm/services/cephadmservice.py +++ b/src/pybind/mgr/cephadm/services/cephadmservice.py @@ -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])) -- 2.39.5