commit:     2ce11f06e48290efb2d4b6743c8edf01c176b0fc
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 20 17:53:02 2021 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Jun 20 18:54:21 2021 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=2ce11f06

fetch: Fix AttributeError when no URL specified

Closes: https://github.com/gentoo/portage/pull/732
Bug: https://bugs.gentoo.org/796812
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/portage/package/ebuild/fetch.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/portage/package/ebuild/fetch.py 
b/lib/portage/package/ebuild/fetch.py
index c2f7dffc0..100450792 100644
--- a/lib/portage/package/ebuild/fetch.py
+++ b/lib/portage/package/ebuild/fetch.py
@@ -907,8 +907,8 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
        primaryuri_dict = {}
        thirdpartymirror_uris = {}
        for myfile, myuri in file_uri_tuples:
-               override_mirror = myuri.startswith("mirror+")
-               override_fetch = override_mirror or myuri.startswith("fetch+")
+               override_mirror = (myuri or "").startswith("mirror+")
+               override_fetch = override_mirror or (myuri or 
"").startswith("fetch+")
                if override_fetch:
                        myuri = myuri.partition("+")[2]
 

Reply via email to