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>
This commit is contained in:
Stanislav Laznicka
2017-10-03 12:36:21 +02:00
parent 418421d941
commit af1b8513ab
7 changed files with 13 additions and 24 deletions

View File

@@ -369,7 +369,7 @@ class ServerCommandError(PublicError):
For example:
>>> e = CommandError(name='foobar')
>>> raise ServerCommandError(error=e.message, server='https://localhost')
>>> raise ServerCommandError(error=str(e), server='https://localhost')
Traceback (most recent call last):
...
ServerCommandError: error on server 'https://localhost': unknown command 'foobar'