diff options
Diffstat (limited to 'catapult/devil/devil/base_error.py')
-rw-r--r-- | catapult/devil/devil/base_error.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/catapult/devil/devil/base_error.py b/catapult/devil/devil/base_error.py index dadf4da2..4b896613 100644 --- a/catapult/devil/devil/base_error.py +++ b/catapult/devil/devil/base_error.py @@ -10,6 +10,13 @@ class BaseError(Exception): super(BaseError, self).__init__(message) self._is_infra_error = is_infra_error + def __eq__(self, other): + return (self.message == other.message + and self.is_infra_error == other.is_infra_error) + + def __ne__(self, other): + return not self == other + @property def is_infra_error(self): """Property to indicate if error was caused by an infrastructure issue.""" |