def opener(self): return opener_for_url_prefix( self.url_prefix(), self.username, self.password, cache_dict=self.opener_cache_dict, )
def open_locker_uri(uri, opener_cache_dict=None): sha1 = uri[9:] assert len(sha1) == 40 context = SynchronizerContext() opener = opener_for_url_prefix( openretro_url_prefix(), username=context.username, password=context.password, cache_dict=opener_cache_dict) url = "{0}/api/locker/{1}".format(openretro_url_prefix(), sha1) path = Downloader.cache_file_from_url(url, opener=opener) return path
def open_locker_uri(uri, opener_cache_dict=None): sha1 = uri[9:] assert len(sha1) == 40 context = SynchronizerContext() opener = opener_for_url_prefix(openretro_url_prefix(), username=context.username, password=context.password, cache_dict=opener_cache_dict) url = "{0}/api/locker/{1}".format(openretro_url_prefix(), sha1) path = Downloader.cache_file_from_url(url, opener=opener) return path
def opener(self): return opener_for_url_prefix( self.url_prefix(), self.context.username, self.context.password, cache_dict=self.opener_cache_dict)
def opener(self): username, password = self.get_credentials() # FIXME: use cache dict? return opener_for_url_prefix(self.url_prefix(), username, password)