mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
[arch] fix: exception when trying to retrieve the PKGBUILD of a package without a base defined (info)
This commit is contained in:
@@ -69,6 +69,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- AppImage
|
||||
- info: displaying attributes related to the installation after the application has been removed (search)
|
||||
|
||||
- Arch:
|
||||
- AUR:
|
||||
- info: exception when trying to retrieve the PKGBUILD of a package without a base defined
|
||||
|
||||
- UI
|
||||
- some package icons would not appear if there is no URL associated with them
|
||||
|
||||
|
||||
@@ -71,10 +71,13 @@ class AURDataMapper:
|
||||
with open(cached_pkgbuild) as f:
|
||||
pkg.pkgbuild = f.read()
|
||||
else:
|
||||
res = self.http_client.get(pkg.get_pkg_build_url())
|
||||
url = pkg.get_pkg_build_url()
|
||||
|
||||
if res and res.status_code == 200 and res.text:
|
||||
pkg.pkgbuild = res.text
|
||||
if url:
|
||||
res = self.http_client.get(url)
|
||||
|
||||
if res and res.status_code == 200 and res.text:
|
||||
pkg.pkgbuild = res.text
|
||||
|
||||
def map_api_data(self, apidata: dict, pkgs_installed: Optional[dict], categories: dict) -> ArchPackage:
|
||||
data = pkgs_installed.get(apidata.get('Name')) if pkgs_installed else None
|
||||
|
||||
Reference in New Issue
Block a user