summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2009-02-05 13:12:11 -0500
committerRob Crittenden <rcritten@redhat.com>2009-02-06 15:25:34 -0500
commit412104e34c0f85f32a4991bed0393b22e7cdf345 (patch)
treef7077c00161b4b7985f3d43a2ecac7231cb0f55d /install
parent31866db9221970ae30d3296cebd2ee92099a7d13 (diff)
downloadfreeipa-412104e34c0f85f32a4991bed0393b22e7cdf345.tar.gz
freeipa-412104e34c0f85f32a4991bed0393b22e7cdf345.tar.xz
freeipa-412104e34c0f85f32a4991bed0393b22e7cdf345.zip
Remove more unused files and functions, replace ipaerror with new error classes
Diffstat (limited to 'install')
-rwxr-xr-xinstall/tools/ipa-compat-manage13
-rwxr-xr-xinstall/tools/ipa-ldap-updater2
2 files changed, 8 insertions, 7 deletions
diff --git a/install/tools/ipa-compat-manage b/install/tools/ipa-compat-manage
index 648e2c3a..233c78b5 100755
--- a/install/tools/ipa-compat-manage
+++ b/install/tools/ipa-compat-manage
@@ -23,9 +23,10 @@ import sys
try:
from optparse import OptionParser
from ipaserver import ipaldap
- from ipa import entity, ipaerror, ipautil, config
- from ipaserver import installutils
- from ipaserver.ldapupdate import LDAPUpdate, BadSyntax, UPDATES_DIR
+ from ipa import entity, ipautil, config
+ from ipaserver.install import installutils
+ from ipaserver.install.ldapupdate import LDAPUpdate, BadSyntax, UPDATES_DIR
+ from ipalib import errors, errors2
import ldap
import logging
import re
@@ -109,7 +110,7 @@ def main():
ldap.SCOPE_BASE, "(objectclass=*)")
print "Plugin already Enabled"
retval = 2
- except ipaerror.exception_for(ipaerror.LDAP_NOT_FOUND):
+ except errors2.NotFound:
print "Enabling plugin"
except ldap.LDAPError, e:
print "An error occurred while talking to the server."
@@ -131,7 +132,7 @@ def main():
conn.deleteEntry("cn=groups,cn=Schema Compatibility,cn=plugins,cn=config")
conn.deleteEntry("cn=users,cn=Schema Compatibility,cn=plugins,cn=config")
conn.deleteEntry("cn=Schema Compatibility,cn=plugins,cn=config")
- except ipaerror.exception_for(ipaerror.LDAP_NOT_FOUND):
+ except errors2.NotFound:
print "Plugin is already disabled"
retval = 2
except ldap.LDAPError, e:
@@ -166,6 +167,6 @@ except config.IPAConfigError, e:
print "An IPA server to update cannot be found. Has one been configured yet?"
print "The error was: %s" % e
sys.exit(1)
-except ipaerror, e:
+except ldap.LDAPError, e:
print "An error occurred while performing operations: %s" % e
sys.exit(1)
diff --git a/install/tools/ipa-ldap-updater b/install/tools/ipa-ldap-updater
index a704d8fc..7487fa0f 100755
--- a/install/tools/ipa-ldap-updater
+++ b/install/tools/ipa-ldap-updater
@@ -27,7 +27,7 @@ import sys
try:
from optparse import OptionParser
from ipaserver import ipaldap
- from ipa import entity, ipaerror, ipautil, config
+ from ipa import entity, ipautil, config
from ipaserver.install import installutils
from ipaserver.install.ldapupdate import LDAPUpdate, BadSyntax, UPDATES_DIR
import ldap