From b11df30d5e6d87919a2da8e0edf294abb50c6ea3 Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Mon, 4 May 2020 12:37:11 -0600 Subject: [PATCH] mgr/insights: fix python3 DeprecationWarning insights/module.py:167: DeprecationWarning: invalid escape sequence \d r = "ceph version (?P\d+)\.(?P\d+)\.(?P\d+)" Signed-off-by: Michael Fritch (cherry picked from commit 41ffb701eca6280df00cd526edfce3a9c851b53b) --- src/pybind/mgr/insights/module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/insights/module.py b/src/pybind/mgr/insights/module.py index a7a12fb7b258b..a640d85b74691 100644 --- a/src/pybind/mgr/insights/module.py +++ b/src/pybind/mgr/insights/module.py @@ -164,7 +164,7 @@ class Module(MgrModule): constituent components, such as when Ceph has been built with ENABLE_GIT_VERSION=OFF. """ - r = "ceph version (?P\d+)\.(?P\d+)\.(?P\d+)" + r = r"ceph version (?P\d+)\.(?P\d+)\.(?P\d+)" m = re.match(r, version) ver = {} if not m else { "release": m.group("release"), -- 2.39.5