Provide missing parts of error messages

Change-Id: I8ccb8a4979ec78b7f87d32d455265eeb57ed442f
This commit is contained in:
Alexey Lebedeff 2015-11-24 14:57:24 +03:00
parent e24f4faf96
commit 46ac91e63e

@ -54,8 +54,12 @@ class PikaIncomingMessage(object):
)
if self.content_type != "application/json":
raise NotImplementedError("Content-type['{}'] is not valid, "
"'application/json' only is supported.")
raise NotImplementedError(
"Content-type['{}'] is not valid, "
"'application/json' only is supported.".format(
self.content_type
)
)
message_dict = common.deserialize_msg(
jsonutils.loads(body, encoding=self.content_encoding)
@ -159,8 +163,12 @@ class PikaOutgoingMessage(object):
self.content_encoding = content_encoding
if self.content_type != "application/json":
raise NotImplementedError("Content-type['{}'] is not valid, "
"'application/json' only is supported.")
raise NotImplementedError(
"Content-type['{}'] is not valid, "
"'application/json' only is supported.".format(
self.content_type
)
)
self.message = message
self.context = context