Use an existing local var rather than doing alookup
This should make ``Ring.get_more_nodes`` microscopically faster. Change-Id: Ibf0988fe0630ad94ac0c04040766d89ef86d1488
This commit is contained in:
parent
cb114e5ecf
commit
5b0788d37d
@ -313,7 +313,7 @@ class Ring(object):
|
||||
dev_id = part2dev_id[handoff_part]
|
||||
dev = self._devs[dev_id]
|
||||
region = dev['region']
|
||||
zone = (dev['region'], dev['zone'])
|
||||
zone = (region, dev['zone'])
|
||||
if dev_id not in used and region not in same_regions:
|
||||
yield dev
|
||||
used.add(dev_id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user