summaryrefslogtreecommitdiff
path: root/qpid/python
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-04-06 18:26:22 +0000
committerAlan Conway <aconway@apache.org>2010-04-06 18:26:22 +0000
commit0e4a47f12834b203a77b9802afa919a562062114 (patch)
treeabf4ae5a4d8247d6e61d2356d0df4744d4bee1f0 /qpid/python
parente50ae93e7dcf628b274df3eaae3921792ed00aeb (diff)
downloadqpid-python-0e4a47f12834b203a77b9802afa919a562062114.tar.gz
Remove non-portable @staticmethod from qpid/datatypes.py
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@931262 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
-rw-r--r--qpid/python/qpid/datatypes.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/qpid/python/qpid/datatypes.py b/qpid/python/qpid/datatypes.py
index fc267c48ef..c37929394c 100644
--- a/qpid/python/qpid/datatypes.py
+++ b/qpid/python/qpid/datatypes.py
@@ -308,17 +308,15 @@ except ImportError:
def uuid4():
return UUID(random_uuid())
-class UUID:
+def parseUUID(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]))
+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)