def send(self, str):
        if self.sock is None:
            if self.auto_open:
                self.connect()
            else:
                raise NotConnected()

        # send the data to the server. if we get a broken pipe, then close
        # the socket. we want to reconnect when somebody tries to send again.
        #
        # NOTE: we DO propagate the error, though, because we cannot simply
        #       ignore the error... the caller will know if they can retry.
        if self.debuglevel > 0:
            print "send:", repr(str)
        try:
            blocksize=8192
            if hasattr(str,'read') :
                if self.debuglevel > 0: print "sendIng a read()able"
                data=str.read(blocksize)
                while data:
                    self.sock.sendall(data)
                    data=str.read(blocksize)
            else:
                self.sock.sendall(str)
        except socket.error, v:
            if v[0] == 32:      # Broken pipe
                self.close()
            raise
Testing the GET repositories/<id>/commits/ API with a local site
dataset/ETHPy150Open deanhiller/databus/webapp/play1.3.x/python/Lib/httplib.py/HTTPConnection.send--crossover with--dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/webapi/tests/test_repository_commits.py/ResourceTests.test_get_with_site