diff options
author | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2019-07-24 08:30:10 +0100 |
---|---|---|
committer | Benjamin Schubert <contact@benschubert.me> | 2019-07-26 09:03:34 +0100 |
commit | 5893e454d4eff12b48252c3e704e9d66c17679b4 (patch) | |
tree | 98b1097766b56c20052c2bc6bd5e1f3d900c7d7e | |
parent | 8b77cb608cb5bdbb51deb213b6a66083f3070734 (diff) | |
download | buildstream-5893e454d4eff12b48252c3e704e9d66c17679b4.tar.gz |
foldme; better valueerror for __{eq,ne}__
Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
-rw-r--r-- | src/buildstream/_types.pyx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buildstream/_types.pyx b/src/buildstream/_types.pyx index fe3cb41e2..14118078d 100644 --- a/src/buildstream/_types.pyx +++ b/src/buildstream/_types.pyx @@ -76,12 +76,12 @@ class FastEnum(metaclass=MetaFastEnum): def __eq__(self, other): if type(self) != type(other): - raise ValueError + raise ValueError("Unexpected comparison between {} and {}".format(self, repr(other))) return self.value == other.value def __ne__(self, other): if type(self) != type(other): - raise ValueError + raise ValueError("Unexpected comparison between {} and {}".format(self, repr(other))) return self.value != other.value def __hash__(self): |