forked from OSchip/llvm-project
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:
parent
3c1c5b9d88
commit
b48b40405e
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue