diff options
author | Stanislav Laznicka <slaznick@redhat.com> | 2017-10-03 12:36:21 +0200 |
---|---|---|
committer | Stanislav Laznicka <slaznick@redhat.com> | 2017-10-06 09:19:46 +0200 |
commit | af1b8513abc8e5be74e2886f9048c747235f1a14 (patch) | |
tree | 11b724eb2813dc1d089af33bc5da4fb9f9c69dde /ipaserver/plugins/group.py | |
parent | 418421d94182f03aa9af38f7ab9ed141828f1eb2 (diff) | |
download | freeipa-af1b8513abc8e5be74e2886f9048c747235f1a14.tar.gz freeipa-af1b8513abc8e5be74e2886f9048c747235f1a14.tar.xz freeipa-af1b8513abc8e5be74e2886f9048c747235f1a14.zip |
Remove the `message` attribute from exceptions
This is causing python2 tests print ugly warnings about the
deprecation of the `message` attribute in python2.6.
https://pagure.io/freeipa/issue/7131
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
Diffstat (limited to 'ipaserver/plugins/group.py')
-rw-r--r-- | ipaserver/plugins/group.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ipaserver/plugins/group.py b/ipaserver/plugins/group.py index 1fb092d5f..5e9427239 100644 --- a/ipaserver/plugins/group.py +++ b/ipaserver/plugins/group.py @@ -439,7 +439,7 @@ class group_mod(LDAPUpdate): # using --setattr. if call_func.__name__ == 'update_entry': if isinstance(exc, errors.ObjectclassViolation): - if 'gidNumber' in exc.message and 'posixGroup' in exc.message: + if 'gidNumber' in str(exc) and 'posixGroup' in str(exc): raise errors.RequirementError(name='gidnumber') raise exc |