summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorEric Smith <eric@trueblade.com>2009-05-23 14:04:31 (GMT)
committerEric Smith <eric@trueblade.com>2009-05-23 14:04:31 (GMT)
commitf73758f012268b8c6af6e021fb9f632154144229 (patch)
tree5d4bea10f1135ca81d9ca233f6a7b83f0ab0aa51 /Objects
parent262dbb10b81a38405409572eecb12ce5def35e5e (diff)
downloadcpython-f73758f012268b8c6af6e021fb9f632154144229.zip
cpython-f73758f012268b8c6af6e021fb9f632154144229.tar.gz
cpython-f73758f012268b8c6af6e021fb9f632154144229.tar.bz2
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. ........
Diffstat (limited to 'Objects')
-rw-r--r--Objects/stringlib/string_format.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/stringlib/string_format.h b/Objects/stringlib/string_format.h
index 600e6b0..6c531e8 100644
--- a/Objects/stringlib/string_format.h
+++ b/Objects/stringlib/string_format.h
@@ -329,8 +329,9 @@ FieldNameIterator_next(FieldNameIterator *self, int *is_attribute,
*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;
}