def renderurl(self): try: content = proxyurl("http://reddit.infogami.com" + request.fullpath) return self.rendercontent(content) except HTTPError, e: if e.code == 404: return self.abort404() else: print "error %s" % e.code print e.fp.read()
def renderurl(self): try: content = proxyurl("http://reddit.infogami.com"+request.fullpath) return self.rendercontent(content) except HTTPError, e: if e.code == 404: return self.abort404() else: print "error %s" % e.code print e.fp.read()
def renderurl_cached(path): # Needed so http://reddit.com/help/ works fp = path.rstrip("/") u = "http://code.reddit.com/wiki" + fp + "?stripped=1" g.log.debug("Pulling %s for help" % u) try: return fp, proxyurl(u) except HTTPError, e: if e.code != 404: print "error %s" % e.code print e.fp.read() return (None, None)
def renderurl(self): # Needed so http://reddit.com/help/ works fp = request.path.rstrip("/") u = "http://code.reddit.com/wiki" + fp + '?stripped=1' try: content = proxyurl(u) return self.rendercontent(content, fp) except HTTPError, e: if e.code != 404: print "error %s" % e.code print e.fp.read() return self.abort404()
def renderurl_cached(path): # Needed so http://reddit.com/help/ works fp = path.rstrip("/") u = "http://code.reddit.com/wiki" + fp + '?stripped=1' g.log.debug("Pulling %s for help" % u) try: return fp, proxyurl(u) except HTTPError, e: if e.code != 404: print "error %s" % e.code print e.fp.read() return (None, None)
def renderurl(self): # Needed so http://reddit.com/help/ works fp = request.path.rstrip("/") u = "http://code.reddit.com/wiki" + fp + '?stripped=1' g.log.debug("Pulling %s for help" % u) try: content = proxyurl(u) return self.rendercontent(content, fp) except HTTPError, e: if e.code != 404: print "error %s" % e.code print e.fp.read() return self.abort404()
def renderurl(self, override=None): if override: path = override else: path = request.path # Needed so http://reddit.com/help/ works fp = path.rstrip("/") u = "http://code.reddit.com/wiki" + fp + '?stripped=1' g.log.debug("Pulling %s for help" % u) try: content = proxyurl(u) return self.rendercontent(content, fp) except HTTPError, e: if e.code != 404: print "error %s" % e.code print e.fp.read() return self.abort404()