Univention Bugzilla – Bug 34539
Traceback when opening policies on deleted object
Last modified: 2015-06-05 15:14:45 CEST
Reported by traceback feedback: Traceback: File "/usr/lib/pymodules/python2.6/notifier/threads.py", line 82, in _run tmp = self._function() File "/usr/lib/pymodules/python2.6/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/__init__.py", line 1046, in _thread policy_obj.clone(obj) File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 2695, in clone self.copyIdentifier( referring_object ) File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 2683, in copyIdentifier self.info[key2]=from_object.info[key] KeyError: 'name' Remark: Drucker sollte gelöscht werden How to reproduce: * Add printer * Open printer * Delete printer in another tab * Open policy tab on opened (now deleted) printer => Minor issue as the printer is deleted. Should make sure that the DN still exists. See Bug #29231 for another example of "missing dn" handling
The same goes for deleted shares: Execution of command 'udm/object/policies shares/share' has failed: Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/management/console/modules/__init__.py", line 176, in _decorated return function(self, request, *args, **kwargs) File "/usr/lib/pymodules/python2.7/notifier/threads.py", line 82, in _run tmp = self._function() File "/usr/lib/pymodules/python2.7/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/__init__.py", line 1104, in _thread policy_obj.clone(obj) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 2786, in clone self.copyIdentifier( referring_object ) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 2774, in copyIdentifier self.info[key2]=from_object.info[key] KeyError: 'name' The might be other tracebacks for each object type → e.g. Bug #37119
Reported again, 4.0-2 errata205 (Walle)
Fixed in svn r61055 - if _obj is None: - raise UMC_OptionTypeError('The object could not be found') + if _obj is None or dn and not obj.exists(): + raise ObjectDoesNotExist(dn) *** This bug has been marked as a duplicate of bug 36256 ***
Fixed typo, svn r61063 Reproduce (with DN which does not exists): umc-client -s 10.200.27.70 -U Administrator -P univention COMMAND udm/object/policies -f shares/print -e -o '[{"objectType":"shares/printer","policies":[],"policyType":"policies/print_quota","objectDN":"cn=foo,cn=printers,dc=nstx,dc=local","container":None}]'