From 5254145321df2be18fce790365d203b7342f48f5 Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Mon, 13 Jul 2009 18:00:40 +0000 Subject: added constant for HEADER_SIZE; made repr(Frame) more informative git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@793641 13f79535-47bb-0310-9956-ffa450edef68 --- python/qpid/framer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/qpid/framer.py b/python/qpid/framer.py index f6363b2291..0d82e4378b 100644 --- a/python/qpid/framer.py +++ b/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()), -- cgit v1.2.1