summaryrefslogtreecommitdiff
path: root/Cython/Compiler/ModuleNode.py
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2014-01-18 15:33:01 +0100
committerStefan Behnel <stefan_ml@behnel.de>2014-01-18 15:33:01 +0100
commit593930b85e3ec93172d36f5bf6c8df7c16b113b9 (patch)
tree295de6a6ffd72195ee7255fa03e7b5c21eb658e1 /Cython/Compiler/ModuleNode.py
parentf0850eb1bb686dc48ae1beb35afffceb84944e8c (diff)
downloadcython-593930b85e3ec93172d36f5bf6c8df7c16b113b9.tar.gz
close output file ASAP
Diffstat (limited to 'Cython/Compiler/ModuleNode.py')
-rw-r--r--Cython/Compiler/ModuleNode.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
index 8a47766c5..fe5bfc69d 100644
--- a/Cython/Compiler/ModuleNode.py
+++ b/Cython/Compiler/ModuleNode.py
@@ -348,11 +348,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
f = open_new_file(result.c_file)
try:
rootwriter.copyto(f)
- if options.gdb_debug:
- self._serialize_lineno_map(env, rootwriter)
finally:
f.close()
result.c_file_generated = 1
+ if options.gdb_debug:
+ self._serialize_lineno_map(env, rootwriter)
if Options.annotate or options.annotate:
self.annotate(rootwriter)
rootwriter.save_annotation(result.main_source_file, result.c_file)