Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Objects/bytearrayobject.c
Co-authored-by: Victor Stinner <[email protected]>
  • Loading branch information
cmaloney and vstinner authored Feb 4, 2025
commit 336299ada6e30fbbf90783e0de56ad08eda5ba3d
4 changes: 2 additions & 2 deletions Objects/bytearrayobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ PyByteArray_Resize(PyObject *self, Py_ssize_t requested_size)
assert(logical_offset <= alloc);

if (requested_size < 0) {
PyErr_Format(PyExc_BufferError,
"Can only resize to positive sizes, got %zd.", requested_size);
PyErr_Format(PyExc_ValueError,
"Can only resize to positive sizes, got %zd", requested_size);
return -1;
}

Expand Down
Loading