summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-11 23:12:24 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-24 11:47:04 (GMT)
commit1cf22eac33b94ad60d2abb33d286b24203b2a2eb (patch)
treec08d889092b3e5e76b4ff9ec52dcff45c518cb41
parent78e8340661e6f7d5b4ea397dafaa2d2f9e25c744 (diff)
make Message classes sortable. Needed for kajonggtest python3 --log
-rw-r--r--src/message.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/message.py b/src/message.py
index 0987ed3..93722a4 100644
--- a/src/message.py
+++ b/src/message.py
@@ -62,6 +62,9 @@ class Message(object):
def __repr__(self):
return 'Message.{}'.format(self.name)
+ def __lt__(self, other):
+ return self.__class__.__name__ < other.__class__.__name__
+
@staticmethod
def jelly(key, value):
"""serialize value for wire transfer. The twisted.pb mechanism with