Remove '__unicode__' magic methods

These don't do anything in Python 3. We should use '__str__' instead.

Change-Id: I3c06744a1de4a65b97556665040bcaa347cdb76b
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
Stephen Finucane 2022-01-27 16:33:07 +00:00
parent 87b4b33e86
commit 33874f09cd

@ -53,12 +53,6 @@ class GlanceException(Exception):
self.msg = message
super(GlanceException, self).__init__(message)
def __unicode__(self):
# NOTE(flwang): By default, self.msg is an instance of Message, which
# can't be converted by str(). Based on the definition of
# __unicode__, it should return unicode always.
return str(self.msg)
class MissingCredentialError(GlanceException):
message = _("Missing required credential: %(required)s")