[Python-checkins] [2.7] bpo-25359: Add missed "goto error" after setting an exception. (GH-3712) (#3779)
Serhiy Storchaka
webhook-mailer at python.org
Wed Sep 27 01:44:06 EDT 2017
https://github.com/python/cpython/commit/4954b8dc5305de72ce618522522a2910c3a34126
commit: 4954b8dc5305de72ce618522522a2910c3a34126
branch: 2.7
author: Serhiy Storchaka <storchaka at gmail.com>
committer: GitHub <noreply at github.com>
date: 2017年09月27日T08:44:03+03:00
summary:
[2.7] bpo-25359: Add missed "goto error" after setting an exception. (GH-3712) (#3779)
(cherry picked from commit d6238a76c655e0feb13478505220dc9049f1682f)
files:
M Modules/_io/textio.c
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index d9e036db386..bf37f72bd11 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -907,6 +907,7 @@ textiowrapper_init(textio *self, PyObject *args, PyObject *kwds)
else {
PyErr_SetString(PyExc_IOError,
"could not determine default encoding");
+ goto error;
}
/* Check we have been asked for a real text encoding */
More information about the Python-checkins
mailing list