mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 22:54:16 +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
|
- AppImage
|
||||||
- info: displaying attributes related to the installation after the application has been removed (search)
|
- 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
|
- UI
|
||||||
- some package icons would not appear if there is no URL associated with them
|
- 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:
|
with open(cached_pkgbuild) as f:
|
||||||
pkg.pkgbuild = f.read()
|
pkg.pkgbuild = f.read()
|
||||||
else:
|
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:
|
if url:
|
||||||
pkg.pkgbuild = res.text
|
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:
|
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
|
data = pkgs_installed.get(apidata.get('Name')) if pkgs_installed else None
|
||||||
|
|||||||
Reference in New Issue
Block a user