From fe731d7f5c3dcfa522d5ca77c59dbc2dad597216 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Sun, 21 Apr 2019 23:17:31 +0200 Subject: [PATCH] fixup! pmb.helpers.package.get: prefer right arch binary (!1776) Check if ret_repo is None before trying to access it. --- pmb/helpers/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmb/helpers/package.py b/pmb/helpers/package.py index b4af5985..786cb05b 100644 --- a/pmb/helpers/package.py +++ b/pmb/helpers/package.py @@ -74,7 +74,7 @@ def get(args, pkgname, arch, replace_subpkgnames=False): # Save as result if there was no pmaport, or if the pmaport can not be # built for the given arch, but there is a binary package for that arch # (e.g. temp/mesa can't be built for x86_64, but Alpine has it) - if not ret or ret_repo["arch"] == arch: + if not ret or (ret_repo and ret_repo["arch"] == arch): ret = ret_repo # Find in APKINDEX (other arches)