diff options
author | Rafael H. Schloming <rhs@apache.org> | 2009-07-13 18:00:40 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2009-07-13 18:00:40 +0000 |
commit | 5254145321df2be18fce790365d203b7342f48f5 (patch) | |
tree | 39326ce07f8c96b54e1d12993103e23bb732b0ca | |
parent | b37cea70933f472580000f191ff607a8176ae815 (diff) | |
download | qpid-python-5254145321df2be18fce790365d203b7342f48f5.tar.gz |
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
-rw-r--r-- | python/qpid/framer.py | 3 |
1 files changed, 2 insertions, 1 deletions
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()), |