Bug 41811 - TypeError: _filter_local_schools() takes exactly 3 arguments (2 given)
TypeError: _filter_local_schools() takes exactly 3 arguments (2 given)
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Ucsschool-lib
UCS@school 4.1 R2
Other Linux
: P5 normal (vote)
: UCS@school 4.1 R2 vXXX
Assigned To: Florian Best
Daniel Tröder
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-18 14:22 CEST by Florian Best
Modified: 2016-10-04 13:24 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.091
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 2016-07-18 14:22:14 CEST
>>> import ucsschool.lib.models, univention.admin.uldap
>>> lo,po = univention.admin.uldap.getMachineConnection()
>>> ucsschool.lib.models.School.from_binddn(lo)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/school.py", line 421, in from_binddn
    return cls._filter_local_schools([school])
TypeError: _filter_local_schools() takes exactly 3 arguments (2 given)
Comment 1 Florian Best univentionstaff 2016-07-18 14:26:55 CEST
ucs-school-lib (9.0.20-12):
r71057 | Bug #41811: fix missing argument in School.from_binddn()

ucs-school-lib.yaml:
r71058 | YAML Bug #41811
Comment 2 Daniel Tröder univentionstaff 2016-07-18 14:48:37 CEST
OK: Code
OK: advisory
OK: manual test:

root@sl-schule1:~# ucr get server/role
domaincontroller_slave

root@sl-schule1:~# dpkg -l python-ucs-school
ii  python-ucs-school          9.0.20-9.233.20160 all

root@sl-schule1:~# python
>>> import ucsschool.lib.models, univention.admin.uldap
>>> lo, po = univention.admin.uldap.getMachineConnection()
>>> ucsschool.lib.models.School.from_binddn(lo)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/school.py", line 421, in from_binddn
    return cls._filter_local_schools([school])
TypeError: _filter_local_schools() takes exactly 3 arguments (2 given)
>>> 

root@sl-schule1:~# dpkg -l python-ucs-school
ii  python-ucs-school          9.0.20-12.235.2016 all

root@sl-schule1:~# python
>>> import ucsschool.lib.models, univention.admin.uldap
>>> lo, po = univention.admin.uldap.getMachineConnection()
>>> ucsschool.lib.models.School.from_binddn(lo)
[School(name='schule1', dn='ou=schule1,dc=uni,dc=dtr')]
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2016-10-04 13:24:52 CEST
UCS@school 4.1 R2 v5 has been released.

http://docs.software-univention.de/changelog-ucsschool-4.1R2v5-de.html

If this error occurs again, please clone this bug.