Univention Bugzilla – Full Text Bug Listing |
Summary: | modules/univention/admin/modules.py: pos undefined, unstable sort | ||
---|---|---|---|
Product: | UCS | Reporter: | Philipp Hahn <hahn> |
Component: | UDM - Extended Attributes | Assignee: | Johannes Keiser <keiser> |
Status: | CLOSED FIXED | QA Contact: | Florian Best <best> |
Severity: | normal | ||
Priority: | P5 | CC: | best, gohmann, meybohm |
Version: | UCS 4.2 | Flags: | best:
Patch_Available+
|
Target Milestone: | UCS 4.2-1-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
See Also: |
https://forge.univention.org/bugzilla/show_bug.cgi?id=39336 https://forge.univention.org/bugzilla/show_bug.cgi?id=40487 https://forge.univention.org/bugzilla/show_bug.cgi?id=28171 |
||
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: | Fix syntax error |
Description
Philipp Hahn
2013-10-01 16:04:56 CEST
This happens to me every time I want to commit the UDM package because flake8 complains. Please apply the patch and additionally add "and properties4tabs[tabname]" to the "if tabPosition == -1:" condition. (In reply to Philipp Hahn from comment #0) > Created attachment 5488 [details] > Fix syntax error > (In reply to Florian Best from comment #2) > Please apply the patch and additionally add "and properties4tabs[tabname]" > to the "if tabPosition == -1:" condition. Applied rebased patch: r 80876 univention-directory-manager-modules (12.0.17-60) * Bug #32781: Applied patch from Philipp Hahn - Fix syntax error for updating the position of extended attributes YAML: r 80881 Applied patch: r 80888 univention-directory-manager-modules (12.0.17-63) * Bug #32781: Applied additional patch from Florian Best I could trigger an exception with the following extended attributes: # udm settings/extended_attribute list | grep -e ^DN: -e tabPosition -e tabName DN: cn=free1,cn=custom attributes,cn=univention,dc=school,dc=local tabName: test tabPosition: 2 DN: cn=free2,cn=custom attributes,cn=univention,dc=school,dc=local tabName: test tabPosition: None DN: cn=free3,cn=custom attributes,cn=univention,dc=school,dc=local tabName: test tabPosition: 2 DN: cn=free4,cn=custom attributes,cn=univention,dc=school,dc=local tabName: test tabPosition: None Die Ausführung des Kommandos udm/layout users/user ist fehlgeschlagen: Traceback (most recent call last): File "%PY2.7%/univention/management/console/base.py", line 249, in execute function.__func__(self, request, *args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 117, in _decoarated ret = [func(self, request) for request.options in options] File "%PY2.7%/univention/management/console/modules/decorators.py", line 192, in _response return function(self, request) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 786, in layout module.load(force_reload=True) # reload for instant extended attributes File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 265, in load self.module = _module_cache.get(module, force_reload=force_reload) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 82, in _decorated return method(*args, **kwargs) File "%PY2.7%/univention/management/console/ldap.py", line 143, in _decorated result = func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 234, in get udm_modules.init(ldap_connection, ldap_position, self[name], template_object, force_reload=force_reload) File "%PY2.7%/univention/admin/modules.py", line 135, in init update_extended_attributes(lo, module, position) File "%PY2.7%/univention/admin/modules.py", line 509, in update_extended_attributes currentTab.insert(ea_layout.position, ea_layout.name) File "%PY2.7%/univention/admin/layout.py", line 143, in insert if isinstance(self.layout[currentLine], basestring): IndexError: list index out of range for ((i=1; i<=15; i++)); do udm settings/extended_attribute create --set name=free$i --set shortDescription=free$i --set module=users/user --set objectClass=univentionFreeAttributes --set ldapMapping=univentionFreeAttribute$i --set tabName=test --set tabPosition=$i --position "cn=custom attributes,cn=univention,$(ucr get ldap/base)"; done I can trigger the same exception with the old code when setting any tabPosition to 0. This is effectively Bug #28171. *** Bug 28171 has been marked as a duplicate of this bug. *** Applied patch: r 81072 univention-directory-manager-modules (12.0.17-81) * Bug #32781: Applied patch from Florian Best - Fix error with tabPosition=0 YAML: r 81073 OK: layout looks as before OK: layoutPosition=0 doesn't raise exception anymore OK: YAML |