def dataReceived(self,data):
    s = StringIO(data)
    while True:
      if self.bytesLeft:
        chunk = s.read(self.bytesLeft)
        self.msgBuf += chunk
        self.bytesLeft -= len(chunk)
        if self.bytesLeft <= 0:
          self.handleMessage( self.msgBuf )
          self.hdrBuf = ""
          self.msgBuf = ""
        else:
          s.close()
          return
      remainingHeader = HEADER_SIZE - len(self.hdrBuf)
      if remainingHeader == 0:
        s.close()
        return
      hdrChunk = s.read(remainingHeader)
      if not hdrChunk: break
      self.hdrBuf += hdrChunk
      if len(self.hdrBuf) == HEADER_SIZE:
        self.bytesLeft = struct.unpack(HEADER_FORMAT,self.hdrBuf)[0]
dataset/ETHPy150Open tmm1/graphite/misc/carbon-relay/pyped.py/ConsumerProtocol.dataReceived/operator `==` -> `<=`