1 |
Since FileCopier now captures exceptions instead of showing |
2 |
a traceback, it's necessary to explicitly log them. |
3 |
|
4 |
Bug: https://bugs.gentoo.org/699400 |
5 |
Signed-off-by: Zac Medico <zmedico@g.o> |
6 |
--- |
7 |
lib/portage/_emirrordist/DeletionTask.py | 2 +- |
8 |
lib/portage/_emirrordist/FetchTask.py | 8 ++++---- |
9 |
2 files changed, 5 insertions(+), 5 deletions(-) |
10 |
|
11 |
diff --git a/lib/portage/_emirrordist/DeletionTask.py b/lib/portage/_emirrordist/DeletionTask.py |
12 |
index 2fdafd59e..5eb01d840 100644 |
13 |
--- a/lib/portage/_emirrordist/DeletionTask.py |
14 |
+++ b/lib/portage/_emirrordist/DeletionTask.py |
15 |
@@ -85,7 +85,7 @@ class DeletionTask(CompositeTask): |
16 |
|
17 |
else: |
18 |
logging.error(("%s copy from distfiles " |
19 |
- "to recycle failed") % (self.distfile,)) |
20 |
+ "to recycle failed: %s") % (self.distfile, copier.future.exception())) |
21 |
success = False |
22 |
|
23 |
if success: |
24 |
diff --git a/lib/portage/_emirrordist/FetchTask.py b/lib/portage/_emirrordist/FetchTask.py |
25 |
index 6f547d397..61812ab59 100644 |
26 |
--- a/lib/portage/_emirrordist/FetchTask.py |
27 |
+++ b/lib/portage/_emirrordist/FetchTask.py |
28 |
@@ -372,8 +372,8 @@ class FetchTask(CompositeTask): |
29 |
|
30 |
current_mirror = self._current_mirror |
31 |
if copier.returncode != os.EX_OK: |
32 |
- msg = "%s %s copy failed unexpectedly" % \ |
33 |
- (self.distfile, current_mirror.name) |
34 |
+ msg = "%s %s copy failed unexpectedly: %s" % \ |
35 |
+ (self.distfile, current_mirror.name, copier.future.exception()) |
36 |
self.scheduler.output(msg + '\n', background=True, |
37 |
log_path=self._log_path) |
38 |
logging.error(msg) |
39 |
@@ -549,8 +549,8 @@ class FetchTask(CompositeTask): |
40 |
self._make_layout_links() |
41 |
else: |
42 |
# out of space? |
43 |
- msg = "%s %s copy failed unexpectedly" % \ |
44 |
- (self.distfile, self._fetch_tmp_dir_info) |
45 |
+ msg = "%s %s copy failed unexpectedly: %s" % \ |
46 |
+ (self.distfile, self._fetch_tmp_dir_info, copier.future.exception()) |
47 |
self.scheduler.output(msg + '\n', background=True, |
48 |
log_path=self._log_path) |
49 |
logging.error(msg) |
50 |
-- |
51 |
2.21.0 |