(self)
Set defaults for curl command line options
Set defaults for curl command line options
Set defaults for curl command line options
def _set_defaults(self):
        """Set defaults for curl command line options"""
        self._opts = {
            "insecure": [],
            "header": [],
            "verbose": [],
            "nobody": [],
            "proxy": [],
            "resume": [],
            "ctimeout": ["--connect-timeout", str(self.ctimeout)],
            "timeout": ["-m", str(self.timeout)],
            "other": ["-s", "-q", "-S"]
        }
        if self.insecure:
            self._opts["insecure"] = ["-k"]
        if Msg().level > Msg.DBG:
            self._opts["verbose"] = ["-v"]
        self._files = {
            "url":  "",
            "error_file": FileUtil("execurl_err").mktmp(),
            "output_file": FileUtil("execurl_out").mktmp(),
            "header_file": FileUtil("execurl_hdr").mktmp()
        }
def _set_defaults ( self ) : self . _opts = { "insecure" : [ ] , "header" : [ ] , "verbose" : [ ] , "nobody" : [ ] , "proxy" : [ ] , "resume" : [ ] , "ctimeout" : [ "--connect-timeout" , str ( self . ctimeout ) ] , "timeout" : [ "-m" , str ( self . timeout ) ] , "other" : [ "-s" , "-q" , "-S" ] } if self . insecure : self . _opts [ "insecure" ] = [ "-k" ] if Msg ( ) . level > Msg . DBG : self . _opts [ "verbose" ] = [ "-v" ] self . _files = { "url" : "" , "error_file" : FileUtil ( "execurl_err" ) . mktmp ( ) , "output_file" : FileUtil ( "execurl_out" ) . mktmp ( ) , "header_file" : FileUtil ( "execurl_hdr" ) . mktmp ( ) }