]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/rbd: actually append site_status dict to remote_statuses
authorIlya Dryomov <idryomov@gmail.com>
Tue, 27 Jul 2021 15:20:08 +0000 (17:20 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 30 Aug 2021 12:18:20 +0000 (14:18 +0200)
Using += operator is wrong -- only site_status keys get appended
(and repeatedly at that in case there is more than one remote site
as the keys are added one by one).

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 89888beb1266be5a661fef8643bb6bef0c720f5f)

src/pybind/rbd/rbd.pyx

index a231d56f19487eaf84fd3f98d236a3d6ff8b5dcd..de2b5d3c3fa1b0c80b39679a5407c7fa877de3a5 100644 (file)
@@ -2868,7 +2868,7 @@ cdef class MirrorImageStatusIterator(object):
                         local_status = site_status
                     else:
                         site_status['mirror_uuid'] = mirror_uuid
-                        site_statuses += site_status
+                        site_statuses.append(site_status)
 
                 status = {
                     'name'        : decode_cstr(self.images[i].name),
@@ -5207,7 +5207,7 @@ written." % (self.name, ret, length))
                     local_status = site_status
                 else:
                     site_status['mirror_uuid'] = mirror_uuid
-                    site_statuses += site_status
+                    site_statuses.append(site_status)
             status = {
                 'name': decode_cstr(c_status.name),
                 'id'  : self.id(),