ipalib.messages: Add "message" property to PublicMessage

In Python 3, the "message" property was removed in favor of calling str().
Add it to PublicMessage, since IPA code depends on it.

Reviewed-By: Tomas Babej <tbabej@redhat.com>
This commit is contained in:
Petr Viktorin 2015-10-14 16:03:33 +02:00 committed by Martin Basti
parent ff6613972d
commit 0a23afeab2

View File

@ -122,6 +122,11 @@ class PublicMessage(UserWarning):
code=self.errno,
)
if six.PY3:
@property
def message(self):
return str(self)
class VersionMissing(PublicMessage):
"""