From: Michael Fritch Date: Mon, 4 May 2020 18:37:11 +0000 (-0600) Subject: mgr/insights: fix python3 DeprecationWarning X-Git-Tag: v14.2.10~17^2~13 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=1dec34c27886263e25013946d42cc852f7f1c2c6;p=ceph.git 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) --- diff --git a/src/pybind/mgr/insights/module.py b/src/pybind/mgr/insights/module.py index e88dcb2b5c632..052295a16140f 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"),