diff options
| author | Alan Conway <aconway@apache.org> | 2010-04-06 15:28:39 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2010-04-06 15:28:39 +0000 |
| commit | f2fa7ba12ad258ed925ef7daafb0fa57e340e0c9 (patch) | |
| tree | ea040c2e18ab5f07c2b2c1a534d4caf089fbc5f4 /qpid/python | |
| parent | 949a5cf0cb3605465ae115d809fe1919f1662500 (diff) | |
| download | qpid-python-f2fa7ba12ad258ed925ef7daafb0fa57e340e0c9.tar.gz | |
Added qpid-cluster-store tool to examine & modify cluster store status.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@931185 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
| -rw-r--r-- | qpid/python/qpid/datatypes.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/qpid/python/qpid/datatypes.py b/qpid/python/qpid/datatypes.py index e4cbcb7f10..fc267c48ef 100644 --- a/qpid/python/qpid/datatypes.py +++ b/qpid/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) |
