mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
[python] module imp is deprecated. Refs #313
This commit is contained in:
parent
06e334ebd0
commit
2577da8942
@ -138,10 +138,10 @@ hooks_module_exists(void)
|
|||||||
* indicates that no such module was found; any other exception will
|
* indicates that no such module was found; any other exception will
|
||||||
* be reported as an error.
|
* be reported as an error.
|
||||||
*/
|
*/
|
||||||
imp_module = PyImport_ImportModule("imp");
|
imp_module = PyImport_ImportModule("importlib.util");
|
||||||
if (!imp_module) goto python_error;
|
if (!imp_module) goto python_error;
|
||||||
|
|
||||||
result = PyObject_CallMethod(imp_module, "find_module", "s", "hooks");
|
result = PyObject_CallMethod(imp_module, "find_spec", "s", "hooks");
|
||||||
if (result) {
|
if (result) {
|
||||||
found_hooks = 1;
|
found_hooks = 1;
|
||||||
goto end;
|
goto end;
|
||||||
|
Loading…
Reference in New Issue
Block a user