Commit 150c28d8 authored by Stefan Behnel's avatar Stefan Behnel

delete broken C output file on compiler failures in trial&error mode

--HG--
extra : rebase_source : 183045da113cc86375e2dcd358825cdcc4907f5d
parent 8cd263f6
...@@ -724,9 +724,12 @@ def cythonize_one(pyx_file, c_file, fingerprint, quiet, options=None, raise_on_f ...@@ -724,9 +724,12 @@ def cythonize_one(pyx_file, c_file, fingerprint, quiet, options=None, raise_on_f
import traceback import traceback
traceback.print_exc() traceback.print_exc()
any_failures = 1 any_failures = 1
if any_failures and raise_on_failure: if any_failures:
raise CompileError(None, pyx_file) if raise_on_failure:
if fingerprint and not any_failures: raise CompileError(None, pyx_file)
elif os.path.exists(c_file):
os.remove(c_file)
elif fingerprint:
f = open(c_file, 'rb') f = open(c_file, 'rb')
try: try:
g = gzip_open(fingerprint_file, 'wb') g = gzip_open(fingerprint_file, 'wb')
......
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