diff options
author | Rob Crittenden <rcritten@redhat.com> | 2009-05-08 11:15:45 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2009-05-13 14:16:44 -0400 |
commit | 1c31b5bc08a2f4bc55678c69eb67508122480906 (patch) | |
tree | 0166354ab5bb1e8bb4b664efab23bb86e770556a /ipalib/plugins/automount.py | |
parent | de88954b91f49387421f68a056a2e12cb6e94e7e (diff) | |
download | freeipa-1c31b5bc08a2f4bc55678c69eb67508122480906.tar.gz freeipa-1c31b5bc08a2f4bc55678c69eb67508122480906.tar.xz freeipa-1c31b5bc08a2f4bc55678c69eb67508122480906.zip |
Add a reason to the NotFound exception so we can provide more robust errors
Diffstat (limited to 'ipalib/plugins/automount.py')
-rw-r--r-- | ipalib/plugins/automount.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ipalib/plugins/automount.py b/ipalib/plugins/automount.py index 6378a1385..705941874 100644 --- a/ipalib/plugins/automount.py +++ b/ipalib/plugins/automount.py @@ -291,7 +291,7 @@ class automount_delkey(crud.Del): keydn = k.get('dn') break if not keydn: - raise errors.NotFound(msg='Entry not found') + raise errors.NotFound(reason='Removing keys failed. key %s not found' % keyname) return ldap.delete(keydn) def output_for_cli(self, textui, result, *args, **options): """ @@ -369,7 +369,7 @@ class automount_modkey(crud.Mod): keydn = k.get('dn') break if not keydn: - raise errors.NotFound(msg='Entry not found') + raise errors.NotFound(reason='Update failed, unable to find key %s' % keyname) return ldap.update(keydn, **kw) def output_for_cli(self, textui, result, *args, **options): @@ -517,7 +517,7 @@ class automount_showkey(crud.Get): keydn = k.get('dn') break if not keydn: - raise errors.NotFound(msg='Entry not found') + raise errors.NotFound(reason='Unable to find key %s' % keyname) # FIXME: should kw contain the list of attributes to display? if kw.get('all', False): return ldap.retrieve(keydn) |