Skip to content

Commit

Permalink
bpo-29116: Fix error messages for concatenating bytes and bytearray w…
Browse files Browse the repository at this point in the history
…ith unsupported type. (#709) (#723)

(cherry picked from commit 6b5a9ec)
  • Loading branch information
serhiy-storchaka committed Mar 19, 2017
1 parent da88596 commit 3d258b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Objects/bytearrayobject.c
Expand Up @@ -254,7 +254,7 @@ PyByteArray_Concat(PyObject *a, PyObject *b)
if (PyObject_GetBuffer(a, &va, PyBUF_SIMPLE) != 0 ||
PyObject_GetBuffer(b, &vb, PyBUF_SIMPLE) != 0) {
PyErr_Format(PyExc_TypeError, "can't concat %.100s to %.100s",
Py_TYPE(a)->tp_name, Py_TYPE(b)->tp_name);
Py_TYPE(b)->tp_name, Py_TYPE(a)->tp_name);
goto done;
}

Expand Down
2 changes: 1 addition & 1 deletion Objects/bytesobject.c
Expand Up @@ -1438,7 +1438,7 @@ bytes_concat(PyObject *a, PyObject *b)
if (PyObject_GetBuffer(a, &va, PyBUF_SIMPLE) != 0 ||
PyObject_GetBuffer(b, &vb, PyBUF_SIMPLE) != 0) {
PyErr_Format(PyExc_TypeError, "can't concat %.100s to %.100s",
Py_TYPE(a)->tp_name, Py_TYPE(b)->tp_name);
Py_TYPE(b)->tp_name, Py_TYPE(a)->tp_name);
goto done;
}

Expand Down

0 comments on commit 3d258b1

Please sign in to comment.