aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Objects/funcobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/funcobject.c')
-rw-r--r--Objects/funcobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
index a8a9ee2b9ba..0c69bf4ebcf 100644
--- a/Objects/funcobject.c
+++ b/Objects/funcobject.c
@@ -943,7 +943,7 @@ static int
functools_copy_attr(PyObject *wrapper, PyObject *wrapped, PyObject *name)
{
PyObject *value;
- int res = _PyObject_LookupAttr(wrapped, name, &value);
+ int res = PyObject_GetOptionalAttr(wrapped, name, &value);
if (value != NULL) {
res = PyObject_SetAttr(wrapper, name, value);
Py_DECREF(value);