Bug 40780 - Import script fails to modify users since 4.1-0 erratum 69
Import script fails to modify users since 4.1-0 erratum 69
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 4.1
Other Linux
: P5 critical (vote)
: UCS@school 4.1 Errata
Assigned To: Sönke Schwardt-Krummrich
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-25 18:07 CET by Sönke Schwardt-Krummrich
Modified: 2016-03-16 15:01 CET (History)
0 users

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):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2016-02-25 18:07:19 CET
In erratum 69 a change in univention/uldap.py revealed a bug in ucs-school-import which leads to a traceback while modifying users:

Processing line 1: M    Anton1  Meyer   Anton   gsmitte gsmitte-1A              Anton1@nstx.local       0       1       0
ERROR: <type 'exceptions.TypeError'> unhashable type: 'dict'
Traceback (most recent call last):
  File "/usr/share/ucs-school-import/scripts/import_user", line 1322, in modify_user
    lo.modify(person.getDN(),[("departmentNumber",o_sNr,person.allsNrs)])
  File "/usr/lib/pymodules/python2.7/univention/admin/uldap.py", line 414, in modify
    return self.lo.modify(dn, changes)
  File "/usr/lib/pymodules/python2.7/univention/uldap.py", line 473, in modify
    if not isinstance(oldvalue, basestring) and not isinstance(newvalue, basestring) and set(oldvalue) == set(newvalue):
TypeError: unhashable type: 'dict'
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2016-02-28 16:05:57 CET
ucs-school-import (12.0.4-1):
r67762 | Bug #40780: fix traceback if users are modified via CLI import script

The inapropriate lo.search(…) call has been replaced by a lo.get(…).get(…) call.
Comment 2 Florian Best univentionstaff 2016-02-29 15:02:40 CET
OK: problem reproduced
OK: fix
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2016-03-16 15:01:09 CET
UCS@school 4.1 v5 has been released.

If this error occurs again, please clone this bug.