diff --git a/python/py3compat.h b/python/py3compat.h index d09947bf90d..75baa00503f 100644 --- a/python/py3compat.h +++ b/python/py3compat.h @@ -52,8 +52,6 @@ /* Strings */ -/* description of bytes objects */ -#define PY_DESC_PY3_BYTES "bytes" /* Module init */ diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c index 45abbec14d2..06d821ae390 100644 --- a/source3/libsmb/pylibsmb.c +++ b/source3/libsmb/pylibsmb.c @@ -1735,10 +1735,10 @@ static PyMethodDef py_cli_state_methods[] = { "chkpath(dir_path) -> True or False\n\n" "\t\tReturn true if directory exists, false otherwise." }, { "savefile", (PyCFunction)py_smb_savefile, METH_VARARGS, - "savefile(path, str) -> None\n\n" - "\t\tWrite " PY_DESC_PY3_BYTES " str to file." }, + "savefile(path, bytes) -> None\n\n" + "\t\tWrite bytes to file." }, { "loadfile", (PyCFunction)py_smb_loadfile, METH_VARARGS, - "loadfile(path) -> file contents as a " PY_DESC_PY3_BYTES + "loadfile(path) -> file contents as a bytes object" "\n\n\t\tRead contents of a file." }, { "get_sd", (PyCFunction)py_smb_get_sd, METH_VARARGS, "get_sd(fnum[, security_info=0]) -> security_descriptor object\n\n" diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c index 95b23d8adc3..832899ef1a9 100644 --- a/source4/dsdb/pydsdb.c +++ b/source4/dsdb/pydsdb.c @@ -587,8 +587,7 @@ static PyObject *py_dsdb_DsReplicaAttribute(PyObject *self, PyObject *args) PyObject *item = PyList_GetItem(el_list, i); if (!(PyBytes_Check(item))) { PyErr_Format(PyExc_TypeError, - "ldif_element type should be " - PY_DESC_PY3_BYTES + "ldif_element type should be bytes" ); talloc_free(tmp_ctx); return NULL; @@ -698,8 +697,7 @@ static PyObject *py_dsdb_normalise_attributes(PyObject *self, PyObject *args) PyObject *item = PyList_GetItem(el_list, i); if (!PyBytes_Check(item)) { PyErr_Format(PyExc_TypeError, - "ldif_element type should be " - PY_DESC_PY3_BYTES + "ldif_element type should be bytes" ); talloc_free(tmp_ctx); return NULL;