def __call__(self, req):
        """Sign the request"""
        url = requests.compat.urlsplit(req.url)
        u_host = url.netloc.split(".", 1)[1]
        if u_host.startswith("ufile.") and u_host.endswith(".ucloud.cn"):
            return self._ufile_auth(req)
        else:
            return self._ucloud_auth(req)
def __call__ ( self , req ) : url = requests . compat . urlsplit ( req . url ) u_host = url . netloc . split ( "." , 1 ) [ 1 ] if u_host . startswith ( "ufile." ) and u_host . endswith ( ".ucloud.cn" ) : return self . _ufile_auth ( req ) else : return self . _ucloud_auth ( req )
Sign the request