use set notation instead of iteration

This commit is contained in:
Dan Colish 2012-03-03 18:29:20 -08:00
parent 109985d5a3
commit e25037f08f

View File

@ -16,10 +16,7 @@ def down():
minions = client.cmd('*', 'test.ping', timeout=1)
keys = key._keys('acc')
for minion in minions:
keys.remove(minion)
for minion in sorted(keys):
for minion in sorted(keys - set(minions.keys())):
print minion