Commit b18b5f60 authored by Louis Beauloye's avatar Louis Beauloye
Browse files

fix bug in equil options

parent 46742860
......@@ -852,7 +852,7 @@ class MbsDirdyn(object):
except AttributeError as err:
# if error during cast of strings (i.e in str_to_bytes)
raise TypeError("{:} is str, {:} can not be casted.".format(key, type(value))).with_traceback(err.__traceback__) from None
raise TypeError("{:} is str, can not be casted from {:}".format(key, type(value))).with_traceback(err.__traceback__) from None
except TypeError as err:
# if wrong type in integrator or compute_QC
......
......@@ -940,12 +940,12 @@ class MbsEquil(object):
if key == 'store_results':
self.store_results = int(value)
else:
setattr(self.mbs_part_ptr.contents.options.contents, c_name, options[key]['convert'](value))
setattr(self.mbs_equil_ptr.contents.options.contents, c_name, options[key]['convert'](value))
except ValueError as err:
raise TypeError("{:} is {:}, can not be casted from {:}.".format(key, options[key]['convert'], type(value))).with_traceback(err.__traceback__) from None
except AttributeError as err:
# if error during cast of strings (i.e in str_to_bytes)
raise TypeError("{:} is str, {:} can not be casted.".format(key, type(value))).with_traceback(err.__traceback__) from None
raise TypeError("{:} is str, can not be casted from {:}.".format(key, type(value))).with_traceback(err.__traceback__) from None
def get_options(self, *args):
"""
......
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