From d7c3284447536329bea6983a917cc7ea12b15ec5 Mon Sep 17 00:00:00 2001 From: Giorgos Korfiatis <gkorf@grnet.gr> Date: Mon, 27 Apr 2015 15:34:26 +0300 Subject: [PATCH] Fix pithos list candidates --- agkyra/agkyra/syncer/pithos_client.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/agkyra/agkyra/syncer/pithos_client.py b/agkyra/agkyra/syncer/pithos_client.py index b6d7856..27127ab 100644 --- a/agkyra/agkyra/syncer/pithos_client.py +++ b/agkyra/agkyra/syncer/pithos_client.py @@ -264,10 +264,12 @@ class PithosFileClient(FileClient): for obj in objects) upstream_all_names = set(upstream_all.keys()) if last_modified is not None: - upstream_modified_names = dict( - (k, v) for (k, v) in upstream_all.iteritems() - if v["last_modified"] > last_modified) - candidates = upstream_modified_names + upstream_modified = {} + for obj in objects: + name = obj["name"] + if obj["last_modified"] > last_modified: + upstream_modified[name] = upstream_all[name] + candidates = upstream_modified else: candidates = upstream_all -- GitLab