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
commit7b06ddd5516135748885295b13652bf3a0273dab (patch)
tree7ff6d65eca60a1d98eb6aa7b5c4ce28da8aeb6a5 /python
parente7924328ce10508b0831b9a379e5909ac41ff352 (diff)
downloadqpid-python-7b06ddd5516135748885295b13652bf3a0273dab.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)