diff options
author | Brandt Bucher <brandtbucher@gmail.com> | 2019-06-26 19:06:18 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2019-06-26 19:06:18 (GMT) |
commit | 2a7d596f27b2342caf168a03c95ebf3b56e5dbbd (patch) | |
tree | 58e72304033f783f19450f082c226cefa1108671 /Objects | |
parent | 5150d327924959639215ed0a78feffc0d88258da (diff) | |
download | cpython-2a7d596f27b2342caf168a03c95ebf3b56e5dbbd.zip cpython-2a7d596f27b2342caf168a03c95ebf3b56e5dbbd.tar.gz cpython-2a7d596f27b2342caf168a03c95ebf3b56e5dbbd.tar.bz2 |
bpo-37417: Fix error handling in bytearray.extend. (GH-14407)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/bytearrayobject.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index c684db7..1bb19a9 100644 --- a/Objects/bytearrayobject.c +++ b/Objects/bytearrayobject.c @@ -1698,6 +1698,10 @@ bytearray_extend(PyByteArrayObject *self, PyObject *iterable_of_ints) } Py_DECREF(bytearray_obj); + if (PyErr_Occurred()) { + return NULL; + } + Py_RETURN_NONE; } |