summaryrefslogtreecommitdiff
path: root/python/qpid/spec.py
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2007-09-27 18:56:23 +0000
committerRafael H. Schloming <rhs@apache.org>2007-09-27 18:56:23 +0000
commit36556639d68c39bb7b9362a69e21aa4159e6f1d9 (patch)
tree230898a50a96a7e18f73b485f67b784a97437bfc /python/qpid/spec.py
parent2986ee70a6af129a03ffb0a0d629bf4f5054fc36 (diff)
downloadqpid-python-36556639d68c39bb7b9362a69e21aa4159e6f1d9.tar.gz
added support for 0-10 field table encoding
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@580122 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/spec.py')
-rw-r--r--python/qpid/spec.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/python/qpid/spec.py b/python/qpid/spec.py
index 3cb5f0ca25..2542ccc3e1 100644
--- a/python/qpid/spec.py
+++ b/python/qpid/spec.py
@@ -348,9 +348,10 @@ def load(specfile, *errata):
# constants
for nd in root.query["constant"]:
val = nd["@value"]
- if val.startswith("0x"): continue
- const = Constant(spec, pythonize(nd["@name"]), int(val),
- nd["@class"], get_docs(nd))
+ if val.startswith("0x"): val = int(val, 16)
+ else: val = int(val)
+ const = Constant(spec, pythonize(nd["@name"]), val, nd["@class"],
+ get_docs(nd))
try:
spec.constants.add(const)
except ValueError, e: