summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/f_automount.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2009-01-28 21:47:21 -0700
committerRob Crittenden <rcritten@redhat.com>2009-02-03 15:29:04 -0500
commit5717c9d6689f15c46801f2d251e174fad4ce4748 (patch)
tree31e2a3378638bd63005a3d65d7fe74159860456c /ipalib/plugins/f_automount.py
parent48a278047db50f919a45ef82a57a6983804ed523 (diff)
downloadfreeipa.git-5717c9d6689f15c46801f2d251e174fad4ce4748.tar.gz
freeipa.git-5717c9d6689f15c46801f2d251e174fad4ce4748.tar.xz
freeipa.git-5717c9d6689f15c46801f2d251e174fad4ce4748.zip
Applied Rob's errors patch
Diffstat (limited to 'ipalib/plugins/f_automount.py')
-rw-r--r--ipalib/plugins/f_automount.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/ipalib/plugins/f_automount.py b/ipalib/plugins/f_automount.py
index 2365ce22..1c6511e5 100644
--- a/ipalib/plugins/f_automount.py
+++ b/ipalib/plugins/f_automount.py
@@ -24,7 +24,7 @@ RFC 2707bis http://www.padl.com/~lukeh/rfc2307bis.txt
"""
from ldap import explode_dn
-from ipalib import crud, errors
+from ipalib import crud, errors2
from ipalib import api, Str, Flag, Object, Command
map_attributes = ['automountMapName', 'description', ]
@@ -199,7 +199,7 @@ class automount_delkey(crud.Del):
keydn = k.get('dn')
break
if not keydn:
- raise errors.NotFound
+ raise errors2.NotFound(msg='Entry not found')
return ldap.delete(keydn)
def output_for_cli(self, textui, result, *args, **options):
"""
@@ -277,7 +277,7 @@ class automount_modkey(crud.Mod):
keydn = k.get('dn')
break
if not keydn:
- raise errors.NotFound
+ raise errors2.NotFound(msg='Entry not found')
return ldap.update(keydn, **kw)
def output_for_cli(self, textui, result, *args, **options):
@@ -425,7 +425,7 @@ class automount_showkey(crud.Get):
keydn = k.get('dn')
break
if not keydn:
- raise errors.NotFound
+ raise errors2.NotFound(msg='Entry not found')
# FIXME: should kw contain the list of attributes to display?
if kw.get('all', False):
return ldap.retrieve(keydn)
@@ -466,7 +466,7 @@ class automount_getkeys(Command):
dn = ldap.find_entry_dn("automountmapname", mapname, "automountmap", api.env.container_automount)
try:
keys = ldap.get_one_entry(dn, 'objectclass=*', ['automountkey'])
- except errors.NotFound:
+ except errors2.NotFound:
keys = []
return keys