Beispiel #1
0
    def request(self):
        """Access to the HTTP request object.

        The first time this is accessed, the actual request will be made.
        """
        if not hasattr(self, '_request'):
            try:
                self._request = util.urlopen(self.url)
            except util.UrlOpenError, e:
                raise ImageError('failed to download: %s' % e)
 def pass1(feed):
     from feedplatform.util import urlopen
     assert urlopen(UnicodeFile.query_url).read() == UnicodeFile.content