-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
Description
In the Job class the get_errormsg results depends from check method, but it should be the other way around, if no error is present then the check returns True. For SingleJob.check the default return value is True resulting that by default get_errormsg returns None insted of self._error_msg.
I report the piece of code:
#
class Job
@abstractmethod
def check(self) -> bool:
"""Check if the execution of this instance was successful."""
def get_errormsg(self) -> Optional[str]:
"""Tries to get an error message for a failed job. This method returns ``None`` for successful jobs."""
if self.check():
return None
return (
self._error_msg
if self._error_msg
else "Could not determine error message. Please check the output manually."
)