summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2015-08-10 18:00:36 +0200
committerJan Cholasta <jcholast@redhat.com>2015-09-01 11:38:56 +0200
commitf82463d4e2bf7c652db942608352ab2ce23ec69b (patch)
tree3227b4316c83b19e20bee34577e0845e118647d4 /install
parent7ed51586ca8ccaafab6bb11bb5161dc25800fddf (diff)
downloadfreeipa-f82463d4e2bf7c652db942608352ab2ce23ec69b.tar.gz
freeipa-f82463d4e2bf7c652db942608352ab2ce23ec69b.tar.xz
freeipa-f82463d4e2bf7c652db942608352ab2ce23ec69b.zip
Remove use of sys.exc_value
sys.exc_value is deprecated since Python 1.5, and was removed in Python 3. Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'install')
-rwxr-xr-xinstall/tools/ipa-compat-manage4
-rwxr-xr-xinstall/tools/ipa-nis-manage4
2 files changed, 4 insertions, 4 deletions
diff --git a/install/tools/ipa-compat-manage b/install/tools/ipa-compat-manage
index ee8ac6015..a7477c71c 100755
--- a/install/tools/ipa-compat-manage
+++ b/install/tools/ipa-compat-manage
@@ -30,13 +30,13 @@ try:
from ipalib import api, errors
from ipapython.ipa_log_manager import *
from ipapython.dn import DN
-except ImportError:
+except ImportError as e:
print >> sys.stderr, """\
There was a problem importing one of the required Python modules. The
error was:
%s
-""" % sys.exc_value
+""" % e
sys.exit(1)
compat_dn = DN(('cn', 'Schema Compatibility'), ('cn', 'plugins'), ('cn', 'config'))
diff --git a/install/tools/ipa-nis-manage b/install/tools/ipa-nis-manage
index 45b03c26f..4017230aa 100755
--- a/install/tools/ipa-nis-manage
+++ b/install/tools/ipa-nis-manage
@@ -32,13 +32,13 @@ try:
from ipapython.ipa_log_manager import *
from ipapython.dn import DN
from ipaplatform import services
-except ImportError:
+except ImportError as e:
print >> sys.stderr, """\
There was a problem importing one of the required Python modules. The
error was:
%s
-""" % sys.exc_value
+""" % e
sys.exit(1)
nis_config_dn = DN(('cn', 'NIS Server'), ('cn', 'plugins'), ('cn', 'config'))