From: Sage Weil Date: Thu, 19 Dec 2019 21:52:37 +0000 (-0600) Subject: mgr/crash: fix signature for py3 X-Git-Tag: v15.1.0~418^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=191b55e8341d0dd733e516d015a131ee94f64bb5;p=ceph.git mgr/crash: fix signature for py3 With python3 the sig.digest() is bytes, so c is an int, not a char. Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/crash/module.py b/src/pybind/mgr/crash/module.py index 5fc68e39bf8..0156cf79aee 100644 --- a/src/pybind/mgr/crash/module.py +++ b/src/pybind/mgr/crash/module.py @@ -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