From 041cf67c36988e3aee0eab0e597d78cec8688df0 Mon Sep 17 00:00:00 2001 From: YummyBian Date: Sat, 27 Sep 2014 23:10:48 +0800 Subject: [PATCH] Incorrect variable name in the diskfile.py You should use the suffix variable instead of the hash_ variable when updates the hashes dictionary in the get_hashes(). Fixes Bug1374777 Change-Id: If9a7ab5b6d271385e4fdc79ff9c216047a2f4d7e --- swift/obj/diskfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift/obj/diskfile.py b/swift/obj/diskfile.py index 62b38f8a22..58b7629523 100644 --- a/swift/obj/diskfile.py +++ b/swift/obj/diskfile.py @@ -358,7 +358,7 @@ def get_hashes(partition_dir, recalculate=None, do_listdir=False, if len(suff) == 3: hashes.setdefault(suff, None) modified = True - hashes.update((hash_, None) for hash_ in recalculate) + hashes.update((suffix, None) for suffix in recalculate) for suffix, hash_ in hashes.items(): if not hash_: suffix_dir = join(partition_dir, suffix)