From 333b52ccb5fd69c6b2208f8c38f607f5baf7ac82 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 30 Mar 2009 01:40:21 +0000 Subject: [PATCH] Fix for KEYVALUE VALUETYPE attribute which defaults to 'string' if not present. --- tupleparse.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tupleparse.py b/tupleparse.py index 7ae7a33..2ee9d7c 100644 --- a/tupleparse.py +++ b/tupleparse.py @@ -658,9 +658,13 @@ def parse_keyvalue(tt): check_node(tt, 'KEYVALUE', ['VALUETYPE'], ['TYPE'], [], True) + p = pcdata(tt) + + if not attrs(tt).has_key('VALUETYPE'): + return p; + vt = attrs(tt).get('VALUETYPE') - p = pcdata(tt) if vt == 'string': return p elif vt == 'boolean':