Univention Bugzilla – Bug 37285
udm remove --filter print misleading message
Last modified: 2017-07-27 00:19:03 CEST
$ udm containes/cn create --set name=foo Object created: cn=foo,dc=phahn,dc=pt $ udm containes/cn remove --filter name=foo Object removed: "udm remove" should print the DN of the matched object. diff --git a/branches/ucs-4.0/ucs-4.0-0/management/univention-directory-manager-modules/modules/univention/admincli/admin.py b/branches/ucs-4.0/ucs-4.0-0/management/univention-directory-manager-modules/modules/univention/admincli/admin.py index 2580e44..a37d306 100755 --- a/branches/ucs-4.0/ucs-4.0-0/management/univention-directory-manager-modules/modules/univention/admincli/admin.py +++ b/branches/ucs-4.0/ucs-4.0-0/management/univention-directory-manager-modules/modules/univention/admincli/admin.py @@ -765,7 +765,7 @@ def _doit(arglist): return out + ["OPERATION FAILED"] -#+++# ACTION CREATE #+++# + #+++# ACTION CREATE #+++# if action == 'create' or action == 'new': if hasattr(module,'operations') and module.operations: if not 'add' in module.operations: @@ -902,7 +902,7 @@ def _doit(arglist): dn=object.dn out.append('Object created: %s' % _2utf8( dn ) ) -#+++# ACTION MODIFY #+++# + #+++# ACTION MODIFY #+++# elif action == 'modify' or action == 'edit' or action == 'move': if not dn: out.append('E: DN is missing') @@ -1107,7 +1107,7 @@ def _doit(arglist): except univention.admin.uexceptions.primaryGroupUsed: out.append('E: object in use') return out + ["OPERATION FAILED"] - out.append( 'Object removed: %s'% _2utf8( dn ) ) + out.append('Object removed: %s'% _2utf8(dn or object.dn)) elif action == 'list' or action == 'lookup':
Applied rebased patch: r 80696 univention-directory-manager-modules (12.0.17-40) * Bug #37285: Applied patch from Philipp Hahn - Print DN of object removed with udm remove --filter YAML: r 80697
OK: the DN of the removed object is printed OK: YAML
<http://errata.software-univention.de/ucs/4.2/79.html>