From c4fe092bc34d0bed120ecf369684ece4afec6be0 Mon Sep 17 00:00:00 2001
From: Larry Hastings <larry@hastings.org>
Date: Sun, 19 Jan 2014 02:27:34 -0800
Subject: Issue #20300: Fix exception when setting conversion class member
 "default" to None.

---
 Tools/clinic/clinic.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py
index 4d58056..84bc7b8 100755
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -3446,8 +3446,10 @@ class DSLParser:
             a = [p.name]
             if p.converter.is_optional():
                 a.append('=')
-                value = p.converter.default
-                a.append(p.converter.py_default)
+                value = 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 += "".join(a)
             if add_comma:
-- 
cgit v0.12

