aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2020-02-20 01:51:34 -0800
committerZac Medico <zmedico@gentoo.org>2020-02-20 01:52:33 -0800
commit3de00842d69669a15adaf9e81b0007a7052da5d0 (patch)
tree3a8d131c23993220de757b9f9a3ed214ffdef7f7 /lib
parentAsyncScheduler: use async_start method (diff)
downloadportage-3de00842d69669a15adaf9e81b0007a7052da5d0.tar.gz
portage-3de00842d69669a15adaf9e81b0007a7052da5d0.tar.bz2
portage-3de00842d69669a15adaf9e81b0007a7052da5d0.zip
async_fetch_map: handle _parse_uri_map exception (bug 710130)
If _parse_uri_map raises an exception then raise it to the caller via the returned future. Bug: https://bugs.gentoo.org/710130 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/portage/dbapi/porttree.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/portage/dbapi/porttree.py b/lib/portage/dbapi/porttree.py
index 4bb396a6c..08af17bcd 100644
--- a/lib/portage/dbapi/porttree.py
+++ b/lib/portage/dbapi/porttree.py
@@ -1,4 +1,4 @@
-# Copyright 1998-2019 Gentoo Authors
+# Copyright 1998-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
from __future__ import unicode_literals
@@ -804,8 +804,11 @@ class portdbapi(dbapi):
(mypkg, eapi)))
return
- result.set_result(_parse_uri_map(mypkg,
- {'EAPI':eapi,'SRC_URI':myuris}, use=useflags))
+ try:
+ result.set_result(_parse_uri_map(mypkg,
+ {'EAPI':eapi,'SRC_URI':myuris}, use=useflags))
+ except Exception as e:
+ result.set_exception(e)
aux_get_future = self.async_aux_get(
mypkg, ["EAPI", "SRC_URI"], mytree=mytree, loop=loop)