diff options
author | Eric Smith <eric@trueblade.com> | 2009-05-23 13:56:13 (GMT) |
---|---|---|
committer | Eric Smith <eric@trueblade.com> | 2009-05-23 13:56:13 (GMT) |
commit | 4b94b192ff38f37b99f04605fd6515d7fb97ffea (patch) | |
tree | 49f84be105d3b542933b9ea32347c70ae07c5a92 /Objects | |
parent | 8254d3984015b8965a33e3ddb8c6fc104090eafd (diff) | |
download | cpython-4b94b192ff38f37b99f04605fd6515d7fb97ffea.zip cpython-4b94b192ff38f37b99f04605fd6515d7fb97ffea.tar.gz cpython-4b94b192ff38f37b99f04605fd6515d7fb97ffea.tar.bz2 |
Issue 6089: str.format raises SystemError.
Diffstat (limited to 'Objects')
-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 ce7c909..ee6533e 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; } |