From 99034ac7eb53fdfcfc0401c323d4da8b8c0a7fee Mon Sep 17 00:00:00 2001
From: Piotr Maslanka <piotr.maslanka@henrietta.com.pl>
Date: Tue, 10 Jan 2017 04:01:34 +0100
Subject: [PATCH] py3

---
 coolamqp/clustering/__init__.py               |  1 +
 coolamqp/exceptions.py                        | 19 -------------------
 .../framing/compilation/content_property.py   |  6 +++---
 3 files changed, 4 insertions(+), 22 deletions(-)

diff --git a/coolamqp/clustering/__init__.py b/coolamqp/clustering/__init__.py
index 337b30f..4558112 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 f4ba6aa..4603aae 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 552c063..def6f30 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)
-- 
GitLab