You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an error happens in BoutOutputs.__init__() before self._parallel is defined, the exception message gets hidden behind one from __del__() saying AttributeError: 'BoutOutputs' object has no attribute '_parallel'. What's the 'correct' way to fix this? We could move self._parallel = parallel to the first line of __init__() and I guess that would fix this issue here, but it feels kludgy and non-general. Does anyone know of a nicer pattern?
If an error happens in
BoutOutputs.__init__()
beforeself._parallel
is defined, the exception message gets hidden behind one from__del__()
sayingAttributeError: 'BoutOutputs' object has no attribute '_parallel'
. What's the 'correct' way to fix this? We could moveself._parallel = parallel
to the first line of__init__()
and I guess that would fix this issue here, but it feels kludgy and non-general. Does anyone know of a nicer pattern?For example, this happened in boutproject/BOUT-dev#2335 (comment)
The text was updated successfully, but these errors were encountered: