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:
Alex Gaynor
2013年09月13日 09:50:14 -07:00
parent cb114e5ecf
commit 5b0788d37d

View File

@@ -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)
Reference in New Issue
openstack/swift
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.