lister/gnu: Remove unneeded get_file method
This commit is contained in:
parent
322c9dc7e2
commit
00bb6c7bbf
1 changed files with 8 additions and 14 deletions
|
@ -38,31 +38,25 @@ class GNULister(SimpleLister):
|
|||
origin_url,
|
||||
tarballs=self.tarballs[kwargs.get('name')])
|
||||
|
||||
def get_file(self):
|
||||
def safely_issue_request(self, identifier):
|
||||
'''
|
||||
Download and unzip tree.json.gz file and returns its content
|
||||
in JSON format
|
||||
|
||||
Returns
|
||||
File content in dictionary format
|
||||
|
||||
Args:
|
||||
identifier: resource identifier (unused)
|
||||
|
||||
Returns:
|
||||
Server response
|
||||
|
||||
'''
|
||||
response = requests.get(self.TREE_URL,
|
||||
allow_redirects=True)
|
||||
uncompressed_content = gzip.decompress(response.content)
|
||||
return json.loads(uncompressed_content.decode('utf-8'))
|
||||
|
||||
def safely_issue_request(self, identifier):
|
||||
'''
|
||||
Make network request to download the file which
|
||||
has file structure of the GNU website.
|
||||
|
||||
Args:
|
||||
identifier: resource identifier
|
||||
Returns:
|
||||
Server response
|
||||
'''
|
||||
return self.get_file()
|
||||
|
||||
def list_packages(self, response):
|
||||
"""
|
||||
List the actual gnu origins with their names,url and the list
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue