Bug 49339 - univention.debug2 is missing univention.debug variables
univention.debug2 is missing univention.debug variables
Status: RESOLVED DUPLICATE of bug 46100
Product: UCS
Classification: Unclassified
Component: univention-debug
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-04-24 11:45 CEST by Florian Best
Modified: 2019-04-24 12:27 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
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):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2019-04-24 11:45:39 CEST
The following variables are missing in univention.debug2:
>>> set(vars(univention.debug).keys()) - set(vars(univention.debug2).keys())
set(['FUNCTION', 'begin', 'end', '_debug', 'LOCALE', 'NO_FLUSH', 'PARSER', 'get_level', 'MODULE', 'ACL', 'NO_FUNCTION', 'exit', 'AUTH', 'FLUSH', 'PROTOCOL', 'RESOURCES'])

Therefore it cannot be used as replacement.

Affected is git/toolshed/PYTHONPATH/univention/__init__.py, but I added a workaround there.

$ python -c 'import univention'
Warning: using univention.debug2 fallback.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home//git/toolshed/PYTHONPATH/univention/__init__.py", line 119, in <module>
    do_things()
  File "/home//git/toolshed/PYTHONPATH/univention/__init__.py", line 112, in do_things
    fix_umc_log_init_non_root()
  File "/home//git/toolshed/PYTHONPATH/univention/__init__.py", line 82, in fix_umc_log_init_non_root
    import univention.management.console.log
  File "/home//git2/ucs/management/univention-management-console/src/univention/management/console/log.py", line 51, in <module>
    COMPONENTS = (ud.MAIN, ud.LDAP, ud.NETWORK, ud.SSL, ud.ADMIN, ud.MODULE, ud.AUTH, ud.PARSER, ud.LOCALE, ud.ACL, ud.RESOURCES, ud.PROTOCOL)
AttributeError: 'module' object has no attribute 'MODULE'
Comment 1 Philipp Hahn univentionstaff 2019-04-24 12:26:13 CEST
See <https://git.knut.univention.de/univention/ucs/tree/phahn/4.3-0+46100debug2> for my WIP patch series addressing this and other issues.
Comment 2 Philipp Hahn univentionstaff 2019-04-24 12:27:00 CEST

*** This bug has been marked as a duplicate of bug 46100 ***