summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2007-01-04 20:31:43 +0000
committerRafael H. Schloming <rhs@apache.org>2007-01-04 20:31:43 +0000
commite0c2104bdae8a2f0b2cdaf56951ca585e3067d55 (patch)
tree9e565d41839b9fc360b3b0d61409ae0e48b9e50e
parentb9baacb2a5fc1e508102750d6459a4dd7ad1c52b (diff)
downloadqpid-python-e0c2104bdae8a2f0b2cdaf56951ca585e3067d55.tar.gz
add support for 0-9 style usage of the domain attribute, and added content primitive type
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@492724 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--python/qpid/spec.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/python/qpid/spec.py b/python/qpid/spec.py
index 184ae157d1..0e3a477066 100644
--- a/python/qpid/spec.py
+++ b/python/qpid/spec.py
@@ -189,7 +189,8 @@ class Method(Metadata):
"short": 0,
"long": 0,
"longlong": 0,
- "timestamp": 0}
+ "timestamp": 0,
+ "content": None}
def define_method(self, name):
g = {Method.METHOD: self}
@@ -233,9 +234,11 @@ def get_docs(nd):
def load_fields(nd, l, domains):
for f_nd in nd["field"]:
try:
- type = f_nd["@type"]
+ type = f_nd["@domain"]
except KeyError:
- type = domains[f_nd["@domain"]]
+ type = f_nd["@type"]
+ while domains.has_key(type) and domains[type] != type:
+ type = domains[type]
l.add(Field(f_nd["@name"], f_nd.index(), type, get_docs(f_nd)))
def load(specfile):