Univention Bugzilla – Bug 48958
unify pyhook loading code
Last modified: 2019-04-09 14:23:39 CEST
The UCS@school code loads different subclassses of PyHook with duplicate loading and caching code in multiple Python modules. Refactor to use a common function for all PyHook users.
Loading and caching of ImportPyHook classes and objects is now simplified and centralized in ucsschool.importer.utils.import_pyhook. The PyHooksLoader class can still be used, when class objects are required (e.g. in ucsschool.importer.utils.configuration_checks), but in most cases the convenience classes and functions are sufficient. [4.4] 159343224 Bug #48958: fix wrong formatting [4.4] 7f3301830 Bug #48958: add convenience wrapper for easy usage of PyHooksLoader [4.4] bb2be4d4b Bug #48958: use new ImportPyHookLoader convenience functions [4.4] 8e1a38ffd Bug #48958: improve type hints and py3 compatibility [4.4] 9c8a292a9 Bug #48958: honor dry-run when ImportUser class is used directly [4.4] 105731e4e Bug #48958: advisories ucs-school-lib (12.1.0-1) ucs-school-import (17.0.5-5) ucs-school-umc-exam (9.0.0-3)
*** Bug 48021 has been marked as a duplicate of this bug. ***
Changelog&Advisories: OK Code read: OK Testing was done during QA for some other bugs regarding the Pyhooks Exam Mode tested with no problems.
UCS@school 4.4 v2 has been released. https://docs.software-univention.de/changelog-ucsschool-4.4v2-de.html If this error occurs again, please clone this bug.