Commit 11a7cd1c authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed "AttributeError: 'MemoryReserver' object has no attribute 'logger'" in...

Fixed "AttributeError: 'MemoryReserver' object has no attribute 'logger'" in case MemoryReserver.disabled is True (bug introduced in b436e67b

).
Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent f78b5261
...@@ -320,7 +320,10 @@ class MemoryReserver(object): ...@@ -320,7 +320,10 @@ class MemoryReserver(object):
def __exit__(self, exc_type, exc_val, exc_tb): def __exit__(self, exc_type, exc_val, exc_tb):
self.release() self.release()
self.logger.close()
if not self.disabled:
self.logger.close()
return True if exc_type is None else False return True if exc_type is None else False
......
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