Univention Bugzilla – Bug 52434
AttributeError and ImportError only prints warning for ucr modules and do not fail
Last modified: 2020-11-26 10:28:49 CET
AttributeError and ImportError only prints warning for ucr modules and do not fail This is inconsistent with other python errors in a module, which produce an ucr error. The problem is in "run_module" python/univention/config_registry/handler.py:202. I guess only importing the module and not running it should be in the try...except block? I'm not sure if we need that try...except at all. I would prefer an error if the import does not work.
183 def run_module(modpath, arg, ucr, changes): … 202 » try: 203 » » module = __import__(module_name.replace(os.path.sep, '.')) 204 » » arg2meth[arg](module)(ucr, changes) 205 » except (AttributeError, ImportError) as ex: 206 » » print(ex, file=sys.stderr)