fix scoping issue.

This commit is contained in:
Todd Gamblin 2016-06-05 01:27:35 -07:00
parent ce6ac93abe
commit 4de45c2684

View File

@ -652,6 +652,7 @@ def read():
self._lock.release_read()
else:
tmp = self.index_file + '.tmp'
self._lock.acquire_write()
try:
if index_existed:
@ -666,7 +667,6 @@ def read():
self._provider_index.update(namespaced_name)
tmp = self.index_file + '.tmp'
with open(tmp, 'w') as f:
self._provider_index.to_yaml(f)
os.rename(tmp, self.index_file)