You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2009/07/13 20:00:40 UTC

svn commit: r793641 - /qpid/trunk/qpid/python/qpid/framer.py

Author: rhs
Date: Mon Jul 13 18:00:40 2009
New Revision: 793641

URL: http://svn.apache.org/viewvc?rev=793641&view=rev
Log:
added constant for HEADER_SIZE; made repr(Frame) more informative

Modified:
    qpid/trunk/qpid/python/qpid/framer.py

Modified: qpid/trunk/qpid/python/qpid/framer.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/framer.py?rev=793641&r1=793640&r2=793641&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/framer.py (original)
+++ qpid/trunk/qpid/python/qpid/framer.py Mon Jul 13 18:00:40 2009
@@ -34,6 +34,7 @@
 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 @@
   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()),



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org