|
Lines 59-65
Link Here
|
| 59 |
def update(): |
59 |
def update(): |
| 60 |
'''scan handler modules''' |
60 |
'''scan handler modules''' |
| 61 |
global modules, _superordinates |
61 |
global modules, _superordinates |
| 62 |
modules = {} |
62 |
_modules = {} |
| 63 |
_superordinates = set() |
63 |
_superordinates = set() |
| 64 |
|
64 |
|
| 65 |
# since last update(), syntax.d and hooks.d may have changed (Bug #31154) |
65 |
# since last update(), syntax.d and hooks.d may have changed (Bug #31154) |
|
Lines 67-73
def update():
Link Here
|
| 67 |
univention.admin.hook.import_hook_files() |
67 |
univention.admin.hook.import_hook_files() |
| 68 |
|
68 |
|
| 69 |
def _walk(root, dir, files): |
69 |
def _walk(root, dir, files): |
| 70 |
global modules, _superordinates |
|
|
| 71 |
for file in files: |
70 |
for file in files: |
| 72 |
if not file.endswith('.py') or file.startswith('__'): |
71 |
if not file.endswith('.py') or file.startswith('__'): |
| 73 |
continue |
72 |
continue |
|
Lines 81-87
def _walk(root, dir, files):
Link Here
|
| 81 |
if not hasattr(m, 'module'): |
80 |
if not hasattr(m, 'module'): |
| 82 |
ud.debug(ud.ADMIN, ud.ERROR, 'admin.modules.update: attribute "module" is missing in module %r' % (mod,)) |
81 |
ud.debug(ud.ADMIN, ud.ERROR, 'admin.modules.update: attribute "module" is missing in module %r' % (mod,)) |
| 83 |
continue |
82 |
continue |
| 84 |
modules[m.module] = m |
83 |
_modules[m.module] = m |
| 85 |
if isContainer(m): |
84 |
if isContainer(m): |
| 86 |
containers.append(m) |
85 |
containers.append(m) |
| 87 |
|
86 |
|
|
Lines 92-97
def _walk(root, dir, files):
Link Here
|
| 92 |
if not os.path.isdir(dir): |
91 |
if not os.path.isdir(dir): |
| 93 |
continue |
92 |
continue |
| 94 |
os.path.walk(dir, _walk, p) |
93 |
os.path.walk(dir, _walk, p) |
|
|
94 |
modules = _modules |
| 95 |
|
95 |
|
| 96 |
|
96 |
|
| 97 |
def get(module): |
97 |
def get(module): |