]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/crash: fix signature for py3
authorSage Weil <sage@redhat.com>
Thu, 19 Dec 2019 21:52:37 +0000 (15:52 -0600)
committerSage Weil <sage@redhat.com>
Fri, 20 Dec 2019 13:17:10 +0000 (07:17 -0600)
With python3 the sig.digest() is bytes, so c is an int, not a char.

Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/crash/module.py

index 5fc68e39bf8b7c18cf92d51ad527261b1e7d821b..0156cf79aee9c85cf54fbabb0a89d118921c1a88 100644 (file)
@@ -163,8 +163,7 @@ class Module(MgrModule):
             sig.update(func.encode())
         if assert_msg:
             sig.update(self.sanitize_assert_msg(assert_msg).encode())
-        # remove 'ord' for py3
-        return ''.join('%02x' % ord(c) for c in sig.digest())
+        return ''.join('%02x' % c for c in sig.digest())
 
     # command handlers