Commit 9f70e96e authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Don't use "with lock" syntax in the driver

Older versions of python, including that on the Windows nightly builder,
throw "SyntaxError: invalid syntax".
parent 767c1b72
......@@ -1623,8 +1623,15 @@ def mkPath(curdir, path):
def addTestFilesWritten(name, fn):
if config.use_threads:
with t.lockFilesWritten:
# We would use
# with t.lockFilesWritten:
# addTestFilesWrittenHelper(name, fn)
# but old versions of python fail with "SyntaxError: invalid syntax"
t.lockFilesWritten.acquire()
try:
addTestFilesWrittenHelper(name, fn)
finally:
t.lockFilesWritten.release()
else:
addTestFilesWrittenHelper(name, fn)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment