def fill_package_build(self, pkg: ArchPackage): cached_pkgbuild = pkg.get_cached_pkgbuild_path() if pkg.installed and os.path.exists(cached_pkgbuild): with open(cached_pkgbuild) as f: pkg.pkgbuild = f.read() else: res = self.http_client.get(pkg.get_pkg_build_url()) if res and res.status_code == 200 and res.text: pkg.pkgbuild = res.text
def fill_package_build(self, pkg: ArchPackage): res = self.http_client.get(pkg.get_pkg_build_url()) if res and res.status_code == 200 and res.text: pkg.pkgbuild = res.text