def _extra_handlers(self): handlers = [] cfh = urllib2.CacheFTPHandler() cfh.setTimeout(1) handlers.append(cfh) return handlers
def _extra_handlers(self): handlers = [] cfh = urllib2.CacheFTPHandler() self.addCleanup(cfh.clear_cache) cfh.setTimeout(1) handlers.append(cfh) return handlers
def _extra_handlers(self): handlers = [] handlers.append(urllib2.GopherHandler) cfh = urllib2.CacheFTPHandler() cfh.setTimeout(1) handlers.append(cfh) ## # XXX try out some custom proxy objects too! ## def at_cnri(req): ## host = req.get_host() ## debug(host) ## if host[-18:] == '.cnri.reston.va.us': ## return True ## p = CustomProxy('http', at_cnri, 'proxy.cnri.reston.va.us') ## ph = CustomProxyHandler(p) ## handlers.append(ph) return handlers