Commit 0465e1be authored by Fabrice  ALLAIN's avatar Fabrice ALLAIN
Browse files

fix: remove logger during serialization for distance restraint class

parent d816e53f
......@@ -82,11 +82,18 @@ def Dump(this, filename, mode='w', as_string=0, gzip=0):
open_func = open
# Issues if we try to dump the logger since it contains the log file instance
for foo in this.items():
# foo = getattr(this, foo)
if hasattr(foo, "logger"):
delattr(foo, "logger")
# TODO: do better testing
def remove_logger(this):
if hasattr(elt, "items"):
for foo in elt.items():
if hasattr(foo, "logger"):
delattr(foo, "logger")
if type(this) == list:
for elt in this:
f = open_func(filename, mode)
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