]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/rbd: keep a ref to the Image in SnapIterator
authorHector Martin <marcan@marcan.st>
Fri, 26 Feb 2016 10:05:24 +0000 (19:05 +0900)
committerHector Martin <marcan@marcan.st>
Tue, 24 May 2016 11:30:46 +0000 (20:30 +0900)
Signed-off-by: Hector Martin <marcan@marcan.st>
src/pybind/rbd/rbd.pyx

index 92a708bd308326d4a5e4e022e2f24e57e580b02c..e87faa5125b1bc4bb457f72b99f4f781bf51cc65 100644 (file)
@@ -1942,8 +1942,10 @@ cdef class SnapIterator(object):
 
     cdef rbd_snap_info_t *snaps
     cdef int num_snaps
+    cdef object image
 
     def __init__(self, Image image):
+        self.image = image
         self.snaps = NULL
         self.num_snaps = 10
         while True: