[Lldb-commits] [lldb] r237946 - Don't import module `lock` at global scope.
Zachary Turner
zturner at google.com
Thu May 21 13:16:03 PDT 2015
Author: zturner
Date: Thu May 21 15:16:02 2015
New Revision: 237946
URL: http://llvm.org/viewvc/llvm-project?rev=237946&view=rev
Log:
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.
Modified:
lldb/trunk/test/lldbtest.py
Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=237946&r1=237945&r2=237946&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Thu May 21 15:16:02 2015
@@ -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()
More information about the lldb-commits
mailing list