From 9d6ce621f8e9f40715028720a5307855b89f32c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Tue, 31 May 2016 10:47:41 +0200 Subject: [PATCH] saner exceptions in PyAMQP --- coolamqp/backends/pyamqp.py | 4 ++-- setup.py | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/coolamqp/backends/pyamqp.py b/coolamqp/backends/pyamqp.py index 0338f08..0e7636a 100644 --- a/coolamqp/backends/pyamqp.py +++ b/coolamqp/backends/pyamqp.py @@ -11,9 +11,9 @@ def translate_exceptions(fun): def q(*args, **kwargs): try: return fun(*args, **kwargs) - except amqp.ChannelError as e: + except amqp.RecoverableChannelError as e: raise RemoteAMQPError(e.reply_code, e.reply_text) - except (IOError, amqp.ConnectionForced) as e: + except (IOError, amqp.ConnectionForced, amqp.IrrecoverableChannelError) as e: raise ConnectionFailedError(e.message) return q diff --git a/setup.py b/setup.py index 1bf86e0..9936372 100644 --- a/setup.py +++ b/setup.py @@ -1,15 +1,19 @@ #!/usr/bin/env python - +#coding=UTF-8 from distutils.core import setup setup(name='CoolAMQP', version='0.1', description='The AMQP client library', - author=u'Piotr MaĹlanka', + author=u'DMS Serwis s.c.', author_email='piotrm@smok.co', - url='https://github.com/piotrmaslanka/coolamqp', + url='https://github.com/smok-serwis/coolamqp', + download_url='https://github.com/smok-serwis/coolamqp/archive/master.zip', + keywords=['amqp', 'pyamqp', 'rabbitmq', 'client', 'network', 'ha', 'high availability'], packages=['coolamqp', 'coolamqp.backends'], - install_requires=[ + license='MIT License', + long_description='''The Python AMQP client library that makes you forget about all the nasty corner cases about AMQP reconnection''', + requires=[ "amqp" ] ) \ No newline at end of file -- GitLab