diff --git a/coolamqp/clustering/__init__.py b/coolamqp/clustering/__init__.py index 337b30fa20106d995704f7210238884b0fe5c5a8..455811291383ec21d5aad6490cc8bec928e5215c 100644 --- a/coolamqp/clustering/__init__.py +++ b/coolamqp/clustering/__init__.py @@ -9,5 +9,6 @@ import logging logger = logging.getLogger(__name__) +__all__ = ('Cluster') from coolamqp.clustering.cluster import Cluster diff --git a/coolamqp/exceptions.py b/coolamqp/exceptions.py index f4ba6aa34585e02e437d65e82aa130bbdbf58908..4603aaeeb5f7bde3c20fdaf1c3eb3999d89d3f84 100644 --- a/coolamqp/exceptions.py +++ b/coolamqp/exceptions.py @@ -6,25 +6,6 @@ class CoolAMQPError(Exception): """Base class for CoolAMQP errors""" - -class ConsumerError(CoolAMQPError): - """ - Exceptions passed to consumer callables. - """ - - -class UplinkLost(ConsumerError): - """ - Uplink to the network has been lost, I am working on regaining connectivity - right now. - """ - -class ConsumerCancelled(CoolAMQPError): - """ - The consumer has been cancelled - """ - - class AMQPError(CoolAMQPError): """ Base class for errors received from AMQP server diff --git a/coolamqp/framing/compilation/content_property.py b/coolamqp/framing/compilation/content_property.py index 552c06394fb8c324980acb32fe358fc6d27331f9..def6f30752e564b56beb0f271895c02c12dbdcd6 100644 --- a/coolamqp/framing/compilation/content_property.py +++ b/coolamqp/framing/compilation/content_property.py @@ -89,12 +89,12 @@ def _compile_particular_content_property_list_class(zpf, fields): mod.append(u'\n def write_to(self, buf):\n') mod.append(u' buf.write(') repred_zpf = repr(zpf) - if not zpf.startswith(u'b'): + if not repred_zpf.startswith(u'b'): repred_zpf = u'b' + repred_zpf mod.append(repred_zpf) mod.append(u')\n') - mod.append(get_serializer(present_fields, prefix='self.', indent_level=2)) + mod.append(get_serializer(present_fields, prefix=u'self.', indent_level=2)) # from_buffer # note that non-bit values @@ -109,7 +109,7 @@ def _compile_particular_content_property_list_class(zpf, fields): # get_size mod.append(u'\n def get_size(self):\n') - mod.append(get_counter(present_fields, prefix='self.', indent_level=2)[:-1]) # skip eol + mod.append(get_counter(present_fields, prefix=u'self.', indent_level=2)[:-1]) # skip eol mod.append(u' + %s\n' % (zpf_length, )) # account for pf length return u''.join(mod)