summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-06-05 01:27:35 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-08-08 21:04:23 -0700
commit4de45c268417e518c7ee616d7454c1c91a5b8b35 (patch)
tree67cc48066e099eb055ef4ecf25c1e6750769afa9 /lib
parentce6ac93abed2a7193745f7082670e1cbe2ffede2 (diff)
downloadspack-4de45c268417e518c7ee616d7454c1c91a5b8b35.tar.gz
spack-4de45c268417e518c7ee616d7454c1c91a5b8b35.tar.bz2
spack-4de45c268417e518c7ee616d7454c1c91a5b8b35.tar.xz
spack-4de45c268417e518c7ee616d7454c1c91a5b8b35.zip
fix scoping issue.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/repository.py2
1 files changed, 1 insertions, 1 deletions
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)