py3: remove Exception.message appearances

Exception.message is removed in Python3

https://pagure.io/freeipa/issue/4985
https://pagure.io/freeipa/issue/6874

Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
This commit is contained in:
Stanislav Laznicka authored and Pavel Vomacka committed 2017-08-29 12:55:25 +02:00
1 parent 7a86ff5d9b
commit e6a9de8a2e
3 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -180,8 +180,8 @@ def main():
principal = krb_utils.get_principal()
except errors.CCacheError as e:
raise ScriptError(
"Must have Kerberos credentials to setup AD trusts on server: %s"
% e.message)
"Must have Kerberos credentials to setup AD trusts on server: "
"{err}".format(err=e))
try:
api.Backend.ldap2.connect()
+1 -1
View File
@@ -1447,7 +1447,7 @@ def set_DNA_range(hostname, range, realm, dirman_passwd, next_range=False,
entries = repl.conn.get_entries(dn, repl.conn.SCOPE_ONELEVEL,
"(objectclass=ipaDomainIDRange)")
except errors.NotFound as e:
sys.exit('Unable to load IPA ranges: %s' % e.message)
sys.exit('Unable to load IPA ranges: {err}'.format(err=e))
for ent in entries:
entry_start = int(ent.single_value['ipabaseid'])