aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2019-11-06 00:03:48 -0800
committerZac Medico <zmedico@gentoo.org>2019-11-06 12:05:27 -0800
commite5c7b9e292c81c74c6b016aa03ef76214515f0bd (patch)
treee5727d09cd55d68a67db89155d0661a2ead215e8 /lib/portage/_emirrordist/FetchTask.py
parentFileCopier: capture exceptions (diff)
downloadportage-e5c7b9e292c81c74c6b016aa03ef76214515f0bd.tar.gz
portage-e5c7b9e292c81c74c6b016aa03ef76214515f0bd.tar.bz2
portage-e5c7b9e292c81c74c6b016aa03ef76214515f0bd.zip
emaint: log FileCopier exceptions
Since FileCopier now captures exceptions instead of showing a traceback, it's necessary to explicitly log them. Bug: https://bugs.gentoo.org/699400 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib/portage/_emirrordist/FetchTask.py')
-rw-r--r--lib/portage/_emirrordist/FetchTask.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/portage/_emirrordist/FetchTask.py b/lib/portage/_emirrordist/FetchTask.py
index ca573fa49..0441fc677 100644
--- a/lib/portage/_emirrordist/FetchTask.py
+++ b/lib/portage/_emirrordist/FetchTask.py
@@ -372,8 +372,8 @@ class FetchTask(CompositeTask):
current_mirror = self._current_mirror
if copier.returncode != os.EX_OK:
- msg = "%s %s copy failed unexpectedly" % \
- (self.distfile, current_mirror.name)
+ msg = "%s %s copy failed unexpectedly: %s" % \
+ (self.distfile, current_mirror.name, copier.future.exception())
self.scheduler.output(msg + '\n', background=True,
log_path=self._log_path)
logging.error(msg)
@@ -549,8 +549,8 @@ class FetchTask(CompositeTask):
self._make_layout_links()
else:
# out of space?
- msg = "%s %s copy failed unexpectedly" % \
- (self.distfile, self._fetch_tmp_dir_info)
+ msg = "%s %s copy failed unexpectedly: %s" % \
+ (self.distfile, self._fetch_tmp_dir_info, copier.future.exception())
self.scheduler.output(msg + '\n', background=True,
log_path=self._log_path)
logging.error(msg)