Don't import module `lock` at global scope.

`lock` depends on `fcntl`, which doesn't exist on Windows.  Until
someone implements an equivalent locking mechanism on Windows, we
can't have lock imported globally.

llvm-svn: 237946
This commit is contained in:
Zachary Turner 2015-05-21 20:16:02 +00:00
parent 3c1c5b9d88
commit b48b40405e
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,6 @@ $
import abc
import glob
import lock
import os, sys, traceback
import os.path
import re
@ -961,6 +960,7 @@ class Base(unittest2.TestCase):
os.chdir(os.path.join(os.environ["LLDB_TEST"], cls.mydir))
if debug_confirm_directory_exclusivity:
import lock
cls.dir_lock = lock.Lock(os.path.join(full_dir, ".dirlock"))
try:
cls.dir_lock.try_acquire()