diff Objects/stringlib/string_format.h @ 54269:2bcac08cfc6d

Merged revisions 72848 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72848 | eric.smith | 2009-05-23 09:56:13 -0400 (Sat, 23 May 2009) | 1 line Issue 6089: str.format raises SystemError. ........
author Eric Smith <eric@trueblade.com>
date Sat, 23 May 2009 14:23:22 +0000
parents 0935e24c81c0
children cab14be0ada1
line wrap: on
line diff
--- a/Objects/stringlib/string_format.h	Sat May 23 10:38:26 2009 +0000
+++ b/Objects/stringlib/string_format.h	Sat May 23 14:23:22 2009 +0000
@@ -375,8 +375,9 @@
         *name_idx = get_integer(name);
         break;
     default:
-        /* interal error, can't get here */
-        assert(0);
+        /* Invalid character follows ']' */
+        PyErr_SetString(PyExc_ValueError, "Only '.' or '[' may "
+                        "follow ']' in format field specifier");
         return 0;
     }