diff options
author | Eric Smith <eric@trueblade.com> | 2009-05-23 14:23:22 +0000 |
---|---|---|
committer | Eric Smith <eric@trueblade.com> | 2009-05-23 14:23:22 +0000 |
commit | 1b1789c521fd6ba9b0e8565b72525082bb471c00 (patch) | |
tree | b6bcf2f3a59e4cf3d22c28f050fa2bdf3637eed1 /Objects/stringlib/string_format.h | |
parent | 6df688c83ec6890f5a3cece3cb2517a4961d4208 (diff) | |
download | cpython-1b1789c521fd6ba9b0e8565b72525082bb471c00.tar.gz |
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/stringlib/string_format.h')
-rw-r--r-- | Objects/stringlib/string_format.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/stringlib/string_format.h b/Objects/stringlib/string_format.h index 0f57f3fdd4..539feaee18 100644 --- a/Objects/stringlib/string_format.h +++ b/Objects/stringlib/string_format.h @@ -375,8 +375,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; } |