summaryrefslogtreecommitdiffstats
path: root/Tools/clinic
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2014-06-11 11:31:29 (GMT)
committerLarry Hastings <larry@hastings.org>2014-06-11 11:31:29 (GMT)
commitf150378ef02081bdebf40d33ee2d9b286763b346 (patch)
treea377d07c1607bb98c2e9e5a41f1ee4c622a10aa1 /Tools/clinic
parent80f2262dcf6c15dea8308ba976d2b05cc4bbfaed (diff)
downloadcpython-f150378ef02081bdebf40d33ee2d9b286763b346.zip
cpython-f150378ef02081bdebf40d33ee2d9b286763b346.tar.gz
cpython-f150378ef02081bdebf40d33ee2d9b286763b346.tar.bz2
Issue #21629: Fix Argument Clinic's "--converters" feature.
Diffstat (limited to 'Tools/clinic')
-rwxr-xr-xTools/clinic/clinic.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py
index 68a1436..93e8f5a 100755
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -2044,11 +2044,9 @@ def add_default_legacy_c_converter(cls):
# automatically add converter for default format unit
# (but without stomping on the existing one if it's already
# set, in case you subclass)
- if ((cls.format_unit != 'O&') and
+ if ((cls.format_unit not in ('O&', '')) and
(cls.format_unit not in legacy_converters)):
legacy_converters[cls.format_unit] = cls
- if cls.format_unit:
- legacy_converters[cls.format_unit] = cls
return cls
def add_legacy_c_converter(format_unit, **kwargs):