Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 22 lines 950 B view raw
1diff --git a/buildscripts/moduleconfig.py b/buildscripts/moduleconfig.py 2index b4d0bba0490..f59ddd7bc5c 100644 3--- a/buildscripts/moduleconfig.py 4+++ b/buildscripts/moduleconfig.py 5@@ -27,7 +27,7 @@ MongoDB SConscript files do. 6 __all__ = ('discover_modules', 'discover_module_directories', 'configure_modules', 7 'register_module_test') # pylint: disable=undefined-all-variable 8 9-import imp 10+import importlib 11 import inspect 12 import os 13 14@@ -71,7 +71,7 @@ def discover_modules(module_root, allowed_modules): 15 print("adding module: %s" % (name)) 16 fp = open(build_py, "r") 17 try: 18- module = imp.load_module("module_" + name, fp, build_py, 19+ module = importlib.load_module("module_" + name, fp, build_py, 20 (".py", "r", imp.PY_SOURCE)) 21 if getattr(module, "name", None) is None: 22 module.name = name