summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2009-07-13 18:00:40 +0000
committerRafael H. Schloming <rhs@apache.org>2009-07-13 18:00:40 +0000
commitd30c7f570fb20a3d59af800523453bfd48a2f257 (patch)
treeca3dd9847a5546b471d67589994009dd117c4584
parent07b5e3c9a737b288c08730da13f3a76a7d107e69 (diff)
downloadqpid-python-d30c7f570fb20a3d59af800523453bfd48a2f257.tar.gz
added constant for HEADER_SIZE; made repr(Frame) more informative
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@793641 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/python/qpid/framer.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/qpid/python/qpid/framer.py b/qpid/python/qpid/framer.py
index f6363b2291..0d82e4378b 100644
--- a/qpid/python/qpid/framer.py
+++ b/qpid/python/qpid/framer.py
@@ -34,6 +34,7 @@ LAST_FRM = 0x01
class Frame:
HEADER = "!2BHxBH4x"
+ HEADER_SIZE = struct.calcsize(HEADER)
MAX_PAYLOAD = 65535 - struct.calcsize(HEADER)
def __init__(self, flags, type, track, channel, payload):
@@ -57,7 +58,7 @@ class Frame:
def isLastFrame(self):
return bool(LAST_FRM & self.flags)
- def __str__(self):
+ def __repr__(self):
return "%s%s%s%s %s %s %s %r" % (int(self.isFirstSegment()),
int(self.isLastSegment()),
int(self.isFirstFrame()),