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

py2/py3: checkPythonSourceCode

parent f6c3a57a
...@@ -482,8 +482,11 @@ def checkPythonSourceCode(source_code_str, portal_type=None): ...@@ -482,8 +482,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