Commit 18679b64 authored by Jérome Perrin's avatar Jérome Perrin

py2/py3: checkPythonSourceCode

parent 6ff7637c
......@@ -515,8 +515,11 @@ def checkPythonSourceCode(source_code_str, portal_type=None):
message_list = []
output_file = StringIO()
try:
with tempfile.NamedTemporaryFile(prefix='checkPythonSourceCode',
suffix='.py') as input_file:
with tempfile.NamedTemporaryFile(
prefix='checkPythonSourceCode',
suffix='.py',
mode='w',
) as input_file:
input_file.write(source_code_str)
input_file.flush()
......
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