summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/clinic/clinic.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py
index 3d4feaf..56e4911 100755
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -2343,9 +2343,11 @@ class DSLParser:
fail("Badly-formed annotation for " + full_name + ": " + returns)
try:
name, legacy, kwargs = self.parse_converter(module.body[0].returns)
- assert not legacy
+ if legacy:
+ fail("Legacy converter {!r} not allowed as a return converter"
+ .format(name))
if name not in return_converters:
- fail("Error: No available return converter called " + repr(name))
+ fail("No available return converter called " + repr(name))
return_converter = return_converters[name](**kwargs)
except ValueError:
fail("Badly-formed annotation for " + full_name + ": " + returns)