Issue #20300: Fix exception when setting conversion class member "default"

to None.
This commit is contained in:
Larry Hastings 2014-01-19 02:27:34 -08:00
parent b7ccb20423
commit c4fe092bc3
1 changed files with 4 additions and 2 deletions

View File

@ -3446,8 +3446,10 @@ class DSLParser:
a = [p.name] a = [p.name]
if p.converter.is_optional(): if p.converter.is_optional():
a.append('=') a.append('=')
value = p.converter.default value = p.converter.py_default
a.append(p.converter.py_default) if not value:
value = str(p.converter.default)
a.append(value)
s = fix_right_bracket_count(p.right_bracket_count) s = fix_right_bracket_count(p.right_bracket_count)
s += "".join(a) s += "".join(a)
if add_comma: if add_comma: