Skip to content
Snippets Groups Projects
Commit aad8e07f authored by Moritz Huebner's avatar Moritz Huebner
Browse files

Reverted some other changes to restore the original behaviour

parent 60a27381
No related branches found
No related tags found
1 merge request!63Docstring update
Pipeline #
......@@ -69,15 +69,15 @@ class Result(dict):
val = self._standardise_a_string(dictionary[key])
setattr(self, key, val)
__setattr__ = dict.__setitem__
__delattr__ = dict.__delitem__
def __getattr__(self, name):
try:
return self[name]
except KeyError:
raise AttributeError(name)
__setattr__ = dict.__setitem__
__delattr__ = dict.__delitem__
def __repr__(self):
"""Print a summary """
if hasattr(self, 'samples'):
......@@ -144,7 +144,7 @@ class Result(dict):
logging.info("Saving result to {}".format(file_name))
try:
deepdish.io.save(file_name, self.__dict__)
deepdish.io.save(file_name, dict(self))
except Exception as e:
logging.error("\n\n Saving the data has failed with the "
"following message:\n {} \n\n".format(e))
......
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