Univention Bugzilla – Full Text Bug Listing |
Summary: | uccsetup/info: fails with IndexError: list index out of range | ||
---|---|---|---|
Product: | UCS | Reporter: | Florian Best <best> |
Component: | UDM (Generic) | Assignee: | Florian Best <best> |
Status: | CLOSED FIXED | QA Contact: | Johannes Keiser <keiser> |
Severity: | normal | ||
Priority: | P5 | ||
Version: | UCS 4.2 | ||
Target Milestone: | UCS 4.2-1-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
See Also: | https://forge.univention.org/bugzilla/show_bug.cgi?id=37171 | ||
What kind of report is it?: | Bug Report | What type of bug is this?: | 6: Setup Problem: Issue for the setup process |
Who will be affected by this bug?: | 1: Will affect a very few installed domains | How will those affected feel about the bug?: | 3: A User would likely not purchase the product |
User Pain: | 0.103 | Enterprise Customer affected?: | |
School Customer affected?: | ISV affected?: | ||
Waiting Support: | Flags outvoted (downgraded) after PO Review: | ||
Ticket number: | 2017072721000223, 2017072721000358, 2017072921000283, 2017073021000155 | Bug group (optional): | Error handling, External feedback |
Max CVSS v3 score: |
Description
Florian Best
2017-08-01 16:31:30 CEST
>>> import univention.admin >>> lo,po=univention.admin.uldap.getMachineConnection() >>> univention.admin.modules.update() E.g. expected behavior for a user: >>> u = univention.admin.modules.get('users/user') >>> u.lookup(None, lo, '', base='cn=DOESNOTEXISTS,dc=school,dc=local', required=True)[0] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/pymodules/python2.7/univention/admin/handlers/users/user.py", line 2846, in lookup for dn, attrs in lo.search(unicode(filter), base, scope, [], unique, required, timeout, sizelimit): File "/usr/lib/pymodules/python2.7/univention/admin/uldap.py", line 425, in search raise univention.admin.uexceptions.noObject(_err2str(msg)) univention.admin.uexceptions.noObject: No such object Broken behavior for policies: >>> p = univention.admin.modules.get('policies/registry') >>> p.lookup(None, lo, '', base='cn=DOESNOTEXISTS,dc=school,dc=local', required=True)[0] Traceback (most recent call last): File "<stdin>", line 1, in <module> IndexError: list index out of range Fixed by catching ImportError: univention-directory-manager-modules (12.0.18-8): r81653 | Bug #45116: fix regression in univention.admin.objects.get() univention-directory-manager-modules.yaml: r81655 | YAML Bug #45116 QA: The following script should raise noObject instead of IndexError: import univention.admin lo,po=univention.admin.uldap.getMachineConnection() univention.admin.modules.update() p = univention.admin.modules.get('policies/registry') print univention.admin.objects.get(p, None, lo, po, 'cn=foo,dc=school,dc=local') OK univention.admin.objects.get fails with noObject error instead of IndexError if policies/registry object does not exist YAML: OK -> verified |