Fixed error in parse_xsd2

This commit is contained in:
Roland Hedberg
2010-07-27 21:55:11 +02:00
parent c60674bae5
commit ecb1c806e3

View File

@@ -186,10 +186,10 @@ class PyObj(object):
if isinstance(prop, PyAttribute):
line.append("%sc_attributes['%s'] = %s" % (INDENT,
prop.name, prop.spec()))
if hasattr(prop,'fixed'):
if prop.fixed:
args.append((prop.pyname, prop.fixed, None))
else:
if hasattr(prop,'default'):
if prop.default:
args.append((prop.pyname, prop.pyname, prop.default))
else:
args.append((prop.pyname, prop.pyname, None))