diff options
author | Lars Gust?bel <lars@gustaebel.de> | 2015-07-02 19:41:03 +0200 |
---|---|---|
committer | Lars Gust?bel <lars@gustaebel.de> | 2015-07-02 19:41:03 +0200 |
commit | a0333aa657baeb3738a8c2fe211168cb1dbab8ac (patch) | |
tree | 9d48b355036c218e706d4e0c698fc3586673bd5b /Python/formatter_unicode.c | |
parent | e8c3a8aa583475fa33dd8b74959193217cb56933 (diff) | |
parent | c6050850b5f399a24702795515d02fdf06b01b4f (diff) | |
download | cpython-a0333aa657baeb3738a8c2fe211168cb1dbab8ac.tar.gz |
Merge with 3.4: Issue #24514: tarfile now tolerates number fields consisting of only whitespace.
Diffstat (limited to 'Python/formatter_unicode.c')
-rw-r--r-- | Python/formatter_unicode.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Python/formatter_unicode.c b/Python/formatter_unicode.c index e3a8149841..056bb76902 100644 --- a/Python/formatter_unicode.c +++ b/Python/formatter_unicode.c @@ -846,6 +846,13 @@ format_long_internal(PyObject *value, const InternalFormatSpec *format, " format specifier 'c'"); goto done; } + /* error to request alternate format */ + if (format->alternate) { + PyErr_SetString(PyExc_ValueError, + "Alternate form (#) not allowed with integer" + " format specifier 'c'"); + goto done; + } /* taken from unicodeobject.c formatchar() */ /* Integer input truncated to a character */ |