Skip to content
Snippets Groups Projects
Commit 8b734cbf authored by Gavin M. Roy's avatar Gavin M. Roy
Browse files

Python 2.6 support for str.format

parent f3a17cc6
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -147,7 +147,8 @@ class Channel0(base.AMQPChannel):
 
"""
properties = {'product': 'rabbitpy',
'platform': 'Python {}.{}.{}'.format(*sys.version_info),
'platform':
'Python {0}.{1}.{2}'.format(*sys.version_info),
'capabilities': {'authentication_failure_close': True,
'basic.nack': True,
'connection.blocked': True,
Loading
Loading
Loading
Loading
@@ -40,7 +40,7 @@ class ConnectionException(RabbitpyException):
 
"""
def __str__(self):
return 'Unable to connect to the remote server {}'.format(self.args)
return 'Unable to connect to the remote server {0}'.format(self.args)
 
 
class ConnectionResetException(RabbitpyException):
Loading
Loading
@@ -65,8 +65,8 @@ class RemoteClosedChannelException(RabbitpyException):
 
"""
def __str__(self):
return 'Channel {} was closed by the remote server ({}): {}'.format(
*self.args)
return 'Channel {0} was closed by the remote server ' \
'({1}): {2}'.format(*self.args)
 
 
class RemoteClosedException(RabbitpyException):
Loading
Loading
@@ -75,8 +75,8 @@ class RemoteClosedException(RabbitpyException):
 
"""
def __str__(self):
return 'Connection was closed by the remote server ({}): {}'.format(
*self.args)
return 'Connection was closed by the remote server ' \
'({0}): {1}'.format(*self.args)
 
 
class MessageReturnedException(RabbitpyException):
Loading
Loading
@@ -85,8 +85,8 @@ class MessageReturnedException(RabbitpyException):
 
"""
def __str__(self):
return 'Message was returned by RabbitMQ: ({}) for exchange {}'.format(
*self.args)
return 'Message was returned by RabbitMQ: ({0}) ' \
'for exchange {1}'.format(*self.args)
 
 
class NoActiveTransactionError(RabbitpyException):
Loading
Loading
@@ -113,7 +113,7 @@ class NotSupportedError(RabbitpyException):
 
"""
def __str__(self):
return 'The selected feature "{}" is not supported'.format(self.args)
return 'The selected feature "{0}" is not supported'.format(self.args)
 
 
class TooManyChannelsError(RabbitpyException):
Loading
Loading
@@ -134,8 +134,8 @@ class UnexpectedResponseError(RabbitpyException):
 
"""
def __str__(self):
return 'Received an expected response, expected {}, ' \
'received {}'.format(*self.args)
return 'Received an expected response, expected {0}, ' \
'received {1}'.format(*self.args)
 
 
# AMQP Exceptions
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment