From 083dfbcf672d6eef8cb01ca94a7cf206751de554 Mon Sep 17 00:00:00 2001 From: songweibin Date: Wed, 11 Sep 2019 10:46:48 +0800 Subject: [PATCH] rbd/pybind: fix unsupported format character of %lx Fixes: ``` >>> image.remove_snap2('snap', 1) Traceback (most recent call last): File "", line 1, in File "rbd.pyx", line 3326, in rbd.Image.remove_snap2 (rbd.c:30069) ValueError: unsupported format character 'l' (0x6c) at index 48 >>> ``` Signed-off-by: songweibin --- src/pybind/rbd/rbd.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/rbd/rbd.pyx b/src/pybind/rbd/rbd.pyx index fd4341ee1a0..ee24d19b4b0 100644 --- a/src/pybind/rbd/rbd.pyx +++ b/src/pybind/rbd/rbd.pyx @@ -3441,7 +3441,7 @@ cdef class Image(object): with nogil: ret = rbd_snap_remove2(self.image, _name, _flags, prog_cb, NULL) if ret != 0: - raise make_ex(ret, 'error removing snapshot %s from %s with flags %llx' % (name, self.name, flags)) + raise make_ex(ret, 'error removing snapshot %s from %s with flags %lx' % (name, self.name, flags)) def remove_snap_by_id(self, snap_id): """ -- 2.39.5