diff options
Diffstat (limited to 'glance_store/exceptions.py')
-rw-r--r-- | glance_store/exceptions.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/glance_store/exceptions.py b/glance_store/exceptions.py index 29526d5..df3e1ff 100644 --- a/glance_store/exceptions.py +++ b/glance_store/exceptions.py @@ -46,9 +46,8 @@ class GlanceStoreException(Exception): message = '' def __init__(self, **kwargs): - msg = kwargs.pop('message', None) - self.msg = msg or self.message.format(**kwargs) - super(Exception, self).__init__(msg) + self.msg = kwargs.pop('message', None) or self.message % kwargs + super(Exception, self).__init__(self.msg) class MissingCredentialError(GlanceStoreException): @@ -73,7 +72,7 @@ class UnknownScheme(GlanceStoreException): class BadStoreUri(GlanceStoreException): - message = _("The Store URI was malformed: %(uri)") + message = _("The Store URI was malformed: %(uri)s") class Duplicate(GlanceStoreException): |