diff options
author | Eric Smith <eric@trueblade.com> | 2009-05-23 14:23:22 (GMT) |
---|---|---|
committer | Eric Smith <eric@trueblade.com> | 2009-05-23 14:23:22 (GMT) |
commit | 41669caebc62a63016d01c84f3bfd2eb219060b2 (patch) | |
tree | 61a3a7e237ad954e34c78a92a9b1c96e36704a4e /Objects/stringlib | |
parent | db1c399fe08d8dc74916b3c945c8bc551b00ff7b (diff) | |
download | cpython-41669caebc62a63016d01c84f3bfd2eb219060b2.zip cpython-41669caebc62a63016d01c84f3bfd2eb219060b2.tar.gz cpython-41669caebc62a63016d01c84f3bfd2eb219060b2.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/stringlib')
-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 0f57f3f..539feae 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; } |