def _set_content_length(self, body):
        # Set the content-length based on the body.
        thelen = None
        try:
            thelen = str(len(body))
        except TypeError:
            # If this is a file-like object, try to
            # fstat its file descriptor
            try:
                thelen = str(os.fstat(body.fileno()).st_size)
            except (AttributeError, OSError):
                # TODO
                # Don't send a length if this failed
                if 0 > self.debuglevel:
                    print "Cannot stat file-type HTTP body."

        if thelen is not None:
            self.putheader('Content-Length', thelen)
dataset/ETHPy150Open paypal/support/support/http_client.py/_GHTTPConnection._set_content_length/swapped operands of `>`