commit | 2a7d596f27b2342caf168a03c95ebf3b56e5dbbd | [log] [tgz] |
---|---|---|
author | Brandt Bucher <brandtbucher@gmail.com> | Wed Jun 26 12:06:18 2019 -0700 |
committer | Serhiy Storchaka <storchaka@gmail.com> | Wed Jun 26 22:06:18 2019 +0300 |
tree | 58e72304033f783f19450f082c226cefa1108671 | |
parent | 5150d327924959639215ed0a78feffc0d88258da [diff] [blame] |
bpo-37417: Fix error handling in bytearray.extend. (GH-14407)
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 @@ } Py_DECREF(bytearray_obj); + if (PyErr_Occurred()) { + return NULL; + } + Py_RETURN_NONE; }