Revision d443e1dd snf-cyclades-app/synnefo/management/common.py
b/snf-cyclades-app/synnefo/management/common.py | ||
---|---|---|
263 | 263 |
assert(self.split > 0), "split must be positive" |
264 | 264 |
|
265 | 265 |
def fetch_names(self, uuid_list): |
266 |
l = len(uuid_list) |
|
266 |
total = len(uuid_list) |
|
267 |
split = self.split |
|
267 | 268 |
|
268 |
start = 0 |
|
269 |
while start < l: |
|
270 |
end = self.split if l > self.split else l |
|
269 |
for start in range(0, total, split): |
|
270 |
end = start + split |
|
271 | 271 |
try: |
272 | 272 |
names = \ |
273 | 273 |
astakos.get_displaynames(token=ASTAKOS_TOKEN, |
... | ... | |
277 | 277 |
except Exception as e: |
278 | 278 |
log.error("Failed to fetch names: %s", e) |
279 | 279 |
|
280 |
start = end |
|
281 |
|
|
282 | 280 |
def get_uuid(self, name): |
283 | 281 |
if not name in self.users: |
284 | 282 |
try: |
Also available in: Unified diff