(self, pyc, hdr)
Set options for pycurl
Set options for pycurl
Set options for pycurl
def _set_defaults(self, pyc, hdr):
        """Set options for pycurl"""
        if self.insecure:
            pyc.setopt(pyc.SSL_VERIFYPEER, 0)
            pyc.setopt(pyc.SSL_VERIFYHOST, 0)

        pyc.setopt(pyc.FOLLOWLOCATION, False)
        pyc.setopt(pyc.FAILONERROR, False)
        pyc.setopt(pyc.NOPROGRESS, True)
        pyc.setopt(pyc.HEADERFUNCTION, hdr.write)
        pyc.setopt(pyc.USERAGENT, self.agent)
        pyc.setopt(pyc.CONNECTTIMEOUT, self.ctimeout)
        pyc.setopt(pyc.TIMEOUT, self.timeout)
        pyc.setopt(pyc.PROXY, self.http_proxy)
        if Msg.level >= Msg.VER:
            pyc.setopt(pyc.VERBOSE, True)
        else:
            pyc.setopt(pyc.VERBOSE, False)
        self._url = ""
def _set_defaults ( self , pyc , hdr ) : if self . insecure : pyc . setopt ( pyc . SSL_VERIFYPEER , 0 ) pyc . setopt ( pyc . SSL_VERIFYHOST , 0 ) pyc . setopt ( pyc . FOLLOWLOCATION , False ) pyc . setopt ( pyc . FAILONERROR , False ) pyc . setopt ( pyc . NOPROGRESS , True ) pyc . setopt ( pyc . HEADERFUNCTION , hdr . write ) pyc . setopt ( pyc . USERAGENT , self . agent ) pyc . setopt ( pyc . CONNECTTIMEOUT , self . ctimeout ) pyc . setopt ( pyc . TIMEOUT , self . timeout ) pyc . setopt ( pyc . PROXY , self . http_proxy ) if Msg . level >= Msg . VER : pyc . setopt ( pyc . VERBOSE , True ) else : pyc . setopt ( pyc . VERBOSE , False ) self . _url = ""