commit | 5c4ce3e2fa73125fb6f9c501e6c4c8512216b7e1 | [log] [tgz] |
---|---|---|
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | Wed Jun 26 13:17:00 2019 -0700 |
committer | GitHub <noreply@github.com> | Wed Jun 26 13:17:00 2019 -0700 |
tree | 7e29931823996bffaa8b59bbe69bdf63f40334d2 | |
parent | bdbd5e895ddf9aefcb79cdc52341f0697ad6aea0 [diff] [blame] |
bpo-37417: Fix error handling in bytearray.extend. (GH-14407) (cherry picked from commit 2a7d596f27b2342caf168a03c95ebf3b56e5dbbd) Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
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; }