Commit 8051c691 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Tell python to let us use the "with X:" syntax

This fixes the testsuite driver with python 2.5. Patch from Florian Weimer.
parent 83e34c30
......@@ -2,6 +2,9 @@
# (c) Simon Marlow 2002
# This allows us to use the "with X:" syntax with python 2.5:
from __future__ import with_statement
import sys
import os
import errno
......@@ -1623,15 +1626,8 @@ def mkPath(curdir, path):
def addTestFilesWritten(name, fn):
if config.use_threads:
# We would use
# with t.lockFilesWritten:
# addTestFilesWrittenHelper(name, fn)
# but old versions of python fail with "SyntaxError: invalid syntax"
with t.lockFilesWritten:
addTestFilesWrittenHelper(name, fn)
addTestFilesWrittenHelper(name, fn)
Supports Markdown
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