]> granicus.if.org Git - python/commitdiff
improve an error message in clinic
authorAntoine Pitrou <solipsis@pitrou.net>
Tue, 14 Jan 2014 19:52:01 +0000 (20:52 +0100)
committerAntoine Pitrou <solipsis@pitrou.net>
Tue, 14 Jan 2014 19:52:01 +0000 (20:52 +0100)
Tools/clinic/clinic.py

index 86df329a726b1ab089be43a20f7895153bc385ff..3d4feafd7f31862c23a9c34fb48503c478737b89 100755 (executable)
@@ -970,7 +970,10 @@ class BlockParser:
             if self.verify:
                 computed = compute_checksum(output)
                 if checksum != computed:
-                    fail("Checksum mismatch!\nExpected: {}\nComputed: {}".format(checksum, computed))
+                    fail("Checksum mismatch!\nExpected: {}\nComputed: {}\n"
+                         "Suggested fix: remove all generated code including "
+                         "the end marker, or use the '-f' option."
+                        .format(checksum, computed))
         else:
             # put back output
             output_lines = output.splitlines(keepends=True)