Skip to content

Commit

Permalink
TST: move lock.acquire to correct place
Browse files Browse the repository at this point in the history
Can release only if acquire was successful.
  • Loading branch information
pv committed Sep 30, 2018
1 parent d2c485d commit 653733b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,8 @@ def locked_cache_dir(config, cache_key, timeout=900, tag=None):
cache_dir = join(six.text_type(base_dir), 'cache')

lock = LockFile(lockfile)
lock.acquire(timeout=timeout)
try:
lock.acquire(timeout=timeout)

# Clear cache dir contents if it was generated with different
# asv version
tag_fn = join(six.text_type(base_dir), 'tag.json')
Expand Down

0 comments on commit 653733b

Please sign in to comment.