From 36556639d68c39bb7b9362a69e21aa4159e6f1d9 Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Thu, 27 Sep 2007 18:56:23 +0000 Subject: 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 --- python/qpid/spec.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'python/qpid/spec.py') 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: -- cgit v1.2.1