Bug 38297 - AttributeError in admin.modules.update()
AttributeError in admin.modules.update()
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-2-errata
Assigned To: Florian Best
Drees Dormann
Depends on:
  Show dependency treegraph
Reported: 2015-04-20 10:16 CEST by Florian Best
Modified: 2015-07-03 14:10 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:


Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2015-04-20 10:16:10 CEST
We received the following traceback, 4.0-0 errata17 (Walle):

Konnte das Modul udm nicht laden: 'module' object has no attribute 'module'
Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/protocol/modserver.py", line 100, in _load_module
    self.__module = __import__(file_, [], [], modname)
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 69, in <module>
    from .udm_ldap import (
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 69, in <module>
  File "%PY2.7%/univention/admin/modules.py", line 92, in update
    os.path.walk(dir, _walk, p)
  File "/usr/lib/python2.7/posixpath.py", line 246, in walk
    walk(name, func, arg)
  File "/usr/lib/python2.7/posixpath.py", line 238, in walk
    func(arg, top, names)
  File "%PY2.7%/univention/admin/modules.py", line 78, in _walk
AttributeError: 'module' object has no attribute 'module'
Comment 1 Florian Best univentionstaff 2015-05-29 13:42:36 CEST
Just ignoring these modules (probably occurs during development).

touch /usr/lib/pymodules/python2.7/univention/admin/handlers/users/foo.py
touch /usr/share/pyshared/univention/admin/handlers/users/foo.py
>>> import univention.debug
>>> univention.debug.init('stderr', True, True)
13.05.15 18:14:21.167  DEBUG_INIT
<open file 'stderr', mode 'a+' at 0x7fa714e254b0>
>>> import univention.admin.modules
>>> univention.admin.modules.update()
13.05.15 18:14:39.764  ADMIN       ( ERROR   ) : admin.modules.update: attribute "module" is missing in module 'univention.admin.handlers.users.foo'

echo 'module = "users/foo"' > /usr/share/pyshared/univention/admin/handlers/users/foo.py
→ no followup errors in update()

Fix: svn r60938
YAML: 2015-05-28-univention-directory-manager-modules.yaml
Comment 2 Drees Dormann univentionstaff 2015-06-01 13:24:05 CEST
Fix: OK
Yaml: OK
Comment 3 Janek Walkenhorst univentionstaff 2015-07-03 14:10:20 CEST