mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
e958df9028
commit
b2eac6f919
@ -296,7 +296,9 @@ class Blocks(object):
|
|||||||
self.pos = len(self.all_blocks)
|
self.pos = len(self.all_blocks)
|
||||||
self.block_map = {}
|
self.block_map = {}
|
||||||
|
|
||||||
def __exit__(self, *args):
|
def __exit__(self, etype, value, traceback):
|
||||||
|
if value is not None:
|
||||||
|
return # Since there was an exception, the data structures are not in a consistent state
|
||||||
if self.current_block is not None:
|
if self.current_block is not None:
|
||||||
self.all_blocks.append(self.current_block)
|
self.all_blocks.append(self.current_block)
|
||||||
self.current_block = None
|
self.current_block = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user