diff options
author | Georg Brandl <georg@python.org> | 2021-12-12 09:49:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-12 09:49:50 (GMT) |
commit | f4095e53ab708d95e019c909d5928502775ba68f (patch) | |
tree | a5bd29a6f8b22183ccf5d9216224cf1c156ca765 /Objects | |
parent | f3c16a5e72aaf06bec863fa3a172f3deaa491bc9 (diff) | |
download | cpython-f4095e53ab708d95e019c909d5928502775ba68f.zip cpython-f4095e53ab708d95e019c909d5928502775ba68f.tar.gz cpython-f4095e53ab708d95e019c909d5928502775ba68f.tar.bz2 |
bpo-45855: document that `no_block` has no use anymore in PyCapsule_Import (#29665)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/capsule.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Objects/capsule.c b/Objects/capsule.c index 9c9dcf3..606e50e 100644 --- a/Objects/capsule.c +++ b/Objects/capsule.c @@ -214,13 +214,9 @@ PyCapsule_Import(const char *name, int no_block) } if (object == NULL) { - if (no_block) { - object = PyImport_ImportModule(trace); - } else { - object = PyImport_ImportModule(trace); - if (!object) { - PyErr_Format(PyExc_ImportError, "PyCapsule_Import could not import module \"%s\"", trace); - } + object = PyImport_ImportModule(trace); + if (!object) { + PyErr_Format(PyExc_ImportError, "PyCapsule_Import could not import module \"%s\"", trace); } } else { PyObject *object2 = PyObject_GetAttrString(object, trace); |