summaryrefslogtreecommitdiffstats
path: root/Objects/bytearrayobject.c
diff options
context:
space:
mode:
authorEli Bendersky <eliben@gmail.com>2011-03-04 04:55:25 (GMT)
committerEli Bendersky <eliben@gmail.com>2011-03-04 04:55:25 (GMT)
commit1bc4f193d8419405e9b34f5e8dcbeb2ee5a15fc9 (patch)
tree72d14d3dbe86cf5570d4872ce1b8333fe82e04dc /Objects/bytearrayobject.c
parent424298a155b5cc652ce1e539a1fedb658fba9cd1 (diff)
downloadcpython-1bc4f193d8419405e9b34f5e8dcbeb2ee5a15fc9.zip
cpython-1bc4f193d8419405e9b34f5e8dcbeb2ee5a15fc9.tar.gz
cpython-1bc4f193d8419405e9b34f5e8dcbeb2ee5a15fc9.tar.bz2
Issue #11386: Fixed the exception thrown by bytearray.pop() for empty bytearrays
Diffstat (limited to 'Objects/bytearrayobject.c')
-rw-r--r--Objects/bytearrayobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
index b419482..0c80f67 100644
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -2309,8 +2309,8 @@ bytearray_pop(PyByteArrayObject *self, PyObject *args)
return NULL;
if (n == 0) {
- PyErr_SetString(PyExc_OverflowError,
- "cannot pop an empty bytearray");
+ PyErr_SetString(PyExc_IndexError,
+ "pop from empty bytearray");
return NULL;
}
if (where < 0)