Skip to content

Commit

Permalink
Fix for KEYVALUE VALUETYPE attribute which defaults to 'string' if
Browse files Browse the repository at this point in the history
not present.
  • Loading branch information
Tim Potter committed Mar 30, 2009
1 parent 97ba4a2 commit 333b52c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tupleparse.py
Expand Up @@ -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':
Expand Down

0 comments on commit 333b52c

Please sign in to comment.