This is necessary in Python 3 to put a Status in a dictionary or set, but is optional in python 2. It doesn't do any harm implementing it now, and will easy the python 3 transition
Signed-off-by: Dylan Baker <[email protected]> --- framework/status.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/status.py b/framework/status.py index ec873d8..98a9e3d 100644 --- a/framework/status.py +++ b/framework/status.py @@ -196,6 +196,9 @@ class Status(object): def __int__(self): return self.value + def __hash__(self): + return hash(self.name) + class NoChangeStatus(Status): """ Special sublcass of status that overides rich comparison methods -- 2.4.5 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
