]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd/pybind: fix unsupported format character of %lx 30314/head
authorsongweibin <song.weibin@zte.com.cn>
Wed, 11 Sep 2019 02:46:48 +0000 (10:46 +0800)
committersongweibin <song.weibin@zte.com.cn>
Wed, 11 Sep 2019 08:19:06 +0000 (16:19 +0800)
Fixes:
```
>>> image.remove_snap2('snap', 1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  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 <song.weibin@zte.com.cn>
src/pybind/rbd/rbd.pyx

index fd4341ee1a01c281608c80f5404977ebc1c25559..ee24d19b4b083c53d8f4bbd88e943b540607a0a0 100644 (file)
@@ -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):
         """