mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
committed by
Jan Cholasta
parent
7ed51586ca
commit
f82463d4e2
@@ -30,13 +30,13 @@ try:
|
|||||||
from ipalib import api, errors
|
from ipalib import api, errors
|
||||||
from ipapython.ipa_log_manager import *
|
from ipapython.ipa_log_manager import *
|
||||||
from ipapython.dn import DN
|
from ipapython.dn import DN
|
||||||
except ImportError:
|
except ImportError as e:
|
||||||
print >> sys.stderr, """\
|
print >> sys.stderr, """\
|
||||||
There was a problem importing one of the required Python modules. The
|
There was a problem importing one of the required Python modules. The
|
||||||
error was:
|
error was:
|
||||||
|
|
||||||
%s
|
%s
|
||||||
""" % sys.exc_value
|
""" % e
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
compat_dn = DN(('cn', 'Schema Compatibility'), ('cn', 'plugins'), ('cn', 'config'))
|
compat_dn = DN(('cn', 'Schema Compatibility'), ('cn', 'plugins'), ('cn', 'config'))
|
||||||
|
|||||||
@@ -32,13 +32,13 @@ try:
|
|||||||
from ipapython.ipa_log_manager import *
|
from ipapython.ipa_log_manager import *
|
||||||
from ipapython.dn import DN
|
from ipapython.dn import DN
|
||||||
from ipaplatform import services
|
from ipaplatform import services
|
||||||
except ImportError:
|
except ImportError as e:
|
||||||
print >> sys.stderr, """\
|
print >> sys.stderr, """\
|
||||||
There was a problem importing one of the required Python modules. The
|
There was a problem importing one of the required Python modules. The
|
||||||
error was:
|
error was:
|
||||||
|
|
||||||
%s
|
%s
|
||||||
""" % sys.exc_value
|
""" % e
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
nis_config_dn = DN(('cn', 'NIS Server'), ('cn', 'plugins'), ('cn', 'config'))
|
nis_config_dn = DN(('cn', 'NIS Server'), ('cn', 'plugins'), ('cn', 'config'))
|
||||||
|
|||||||
@@ -57,13 +57,13 @@ try:
|
|||||||
from ipapython.ssh import SSHPublicKey
|
from ipapython.ssh import SSHPublicKey
|
||||||
from ipalib.rpc import delete_persistent_client_session_data
|
from ipalib.rpc import delete_persistent_client_session_data
|
||||||
|
|
||||||
except ImportError:
|
except ImportError as e:
|
||||||
print >> sys.stderr, """\
|
print >> sys.stderr, """\
|
||||||
There was a problem importing one of the required Python modules. The
|
There was a problem importing one of the required Python modules. The
|
||||||
error was:
|
error was:
|
||||||
|
|
||||||
%s
|
%s
|
||||||
""" % sys.exc_value
|
""" % e
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
SUCCESS = 0
|
SUCCESS = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user