Commit da2da717 authored by Jérome Perrin's avatar Jérome Perrin

py2/py3: checkPythonSourceCode

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