]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/insights: fix python3 DeprecationWarning
authorMichael Fritch <mfritch@suse.com>
Mon, 4 May 2020 18:37:11 +0000 (12:37 -0600)
committerKefu Chai <kchai@redhat.com>
Wed, 3 Jun 2020 11:57:01 +0000 (19:57 +0800)
insights/module.py:167: DeprecationWarning: invalid escape sequence \d
    r = "ceph version (?P<release>\d+)\.(?P<major>\d+)\.(?P<minor>\d+)"

Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 41ffb701eca6280df00cd526edfce3a9c851b53b)

src/pybind/mgr/insights/module.py

index e88dcb2b5c632855145e7495a162981496a37450..052295a16140fb61e092b385b72f49dc01791f8c 100644 (file)
@@ -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<release>\d+)\.(?P<major>\d+)\.(?P<minor>\d+)"
+        r = r"ceph version (?P<release>\d+)\.(?P<major>\d+)\.(?P<minor>\d+)"
         m = re.match(r, version)
         ver = {} if not m else {
             "release": m.group("release"),