From 4de45c268417e518c7ee616d7454c1c91a5b8b35 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sun, 5 Jun 2016 01:27:35 -0700 Subject: fix scoping issue. --- lib/spack/spack/repository.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/spack/spack/repository.py b/lib/spack/spack/repository.py index 3b0d3167b3..df21810a12 100644 --- a/lib/spack/spack/repository.py +++ b/lib/spack/spack/repository.py @@ -652,6 +652,7 @@ class Repo(object): self._lock.release_read() else: + tmp = self.index_file + '.tmp' self._lock.acquire_write() try: if index_existed: @@ -666,7 +667,6 @@ class Repo(object): 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) -- cgit v1.2.3-70-g09d2