diff options
author | Brandt Bucher <brandtbucher@gmail.com> | 2019-06-26 12:06:18 -0700 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2019-06-26 22:06:18 +0300 |
commit | 2a7d596f27b2342caf168a03c95ebf3b56e5dbbd (patch) | |
tree | 58e72304033f783f19450f082c226cefa1108671 /Objects/bytearrayobject.c | |
parent | 5150d327924959639215ed0a78feffc0d88258da (diff) | |
download | cpython-git-2a7d596f27b2342caf168a03c95ebf3b56e5dbbd.tar.gz |
bpo-37417: Fix error handling in bytearray.extend. (GH-14407)
Diffstat (limited to 'Objects/bytearrayobject.c')
-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 c684db7673..1bb19a9271 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; } |