Univention Bugzilla – Bug 32671
appcenter/app create fails on i386
Last modified: 2013-11-19 06:42:56 CET
In tests the following command fails on i386: root@master181:~# udm appcenter/app create --set name=test --set id=test --set version=test Traceback (most recent call last): File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 222, in doit output = univention.admincli.admin.doit(arglist) File "/usr/lib/pymodules/python2.6/univention/admincli/admin.py", line 394, in doit out=_doit(arglist) File "/usr/lib/pymodules/python2.6/univention/admincli/admin.py", line 657, in _doit input[name].append(value) AttributeError: 'str' object has no attribute 'append' root@master181:~# The problem seems to be the line "superordinate='settings/cn'", because the following code iterates over both modules (settings/cn and appcenter/app): for mod, (properties,options) in information.items(): In settings/cn the attribute 'name' is single value, in appcenter/app the attribute 'name' is multi value.
module_information() in admincli/admin.py saved the properties for the module and identifier properties for all superordinate modules in a dict. This datastructure is used to check if an argument is a valid property and to get the type of the property (multivalue). But if a this data structure contains information about multiple modules (the module and its superordinate module) it could happen that the types for the properties get mixed up. I can't see any reason to save properties from the superordinate module in module_information because we want to create a new module object, not a new object of the superordinate module. -> module_information() only save properties of the module, not the superordinate modules
Code: OK Test: OK Changelog: OK
UCS 3.2 has been released: http://docs.univention.de/release-notes-3.2-en.html http://docs.univention.de/release-notes-3.2-de.html If this error occurs again, please use "Clone This Bug".