Fix redundant add operation of set in ring

You don't need to add dev_id into seen_ids again when it has already existed in seen_ids.

Fixes Bug #1311190

Change-Id: If0766de8dc5e2a59a648cae39c789c91131805d2
This commit is contained in:
YummyBian 2014-04-22 23:52:28 +08:00
parent c20a8377c6
commit aa6bd2c0ab

View File

@ -239,7 +239,7 @@ class Ring(object):
dev_id = r2p2d[part]
if dev_id not in seen_ids:
part_nodes.append(self.devs[dev_id])
seen_ids.add(dev_id)
seen_ids.add(dev_id)
return part_nodes
def get_part(self, account, container=None, obj=None):