summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-04-06 15:28:39 +0000
committerAlan Conway <aconway@apache.org>2010-04-06 15:28:39 +0000
commite70e9f746a726130b848f45563b28a015b4e3fa2 (patch)
tree7ff6d65eca60a1d98eb6aa7b5c4ce28da8aeb6a5 /python
parentb8606dba4f8edc95bf5af7ace7090ca5f9f796b7 (diff)
downloadqpid-python-e70e9f746a726130b848f45563b28a015b4e3fa2.tar.gz
Added qpid-cluster-store tool to examine & modify cluster store status.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@931185 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
-rw-r--r--python/qpid/datatypes.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/python/qpid/datatypes.py b/python/qpid/datatypes.py
index e4cbcb7f10..fc267c48ef 100644
--- a/python/qpid/datatypes.py
+++ b/python/qpid/datatypes.py
@@ -313,6 +313,12 @@ class UUID:
def __init__(self, bytes):
self.bytes = bytes
+ @staticmethod
+ def parse(str):
+ fields=str.split("-")
+ fields[4:5] = [fields[4][:4], fields[4][4:]]
+ return UUID(struct.pack("!LHHHHL", *[int(x,16) for x in fields]))
+
def __cmp__(self, other):
if isinstance(other, UUID):
return cmp(self.bytes, other.bytes)