Skip to content
Snippets Groups Projects
Commit 59513ec7 authored by Pierre-Yves David's avatar Pierre-Yves David
Browse files

transaction: always generate file on close

The conditionnal was buggy and file were only generated if "onclose" was
defined. By luck, "onclose" was always defined.
parent ae5d0a22
No related branches found
No related tags found
No related merge requests found
......@@ -329,8 +329,8 @@
@active
def close(self):
'''commit the transaction'''
if self.count == 1 and self.onclose is not None:
if self.count == 1:
self._generatefiles()
categories = sorted(self._finalizecallback)
for cat in categories:
self._finalizecallback[cat](self)
......@@ -333,8 +333,9 @@
self._generatefiles()
categories = sorted(self._finalizecallback)
for cat in categories:
self._finalizecallback[cat](self)
self.onclose()
if self.onclose is not None:
self.onclose()
self.count -= 1
if self.count != 0:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment