1 |
commit: 8b773727f009e63fbaecf937701d7f9f1a97f112 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 31 22:20:55 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 31 22:20:55 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8b773727 |
7 |
|
8 |
rsync: handle CommandNotFound for gemato (bug 646184) |
9 |
|
10 |
Bug: https://bugs.gentoo.org/646184 |
11 |
|
12 |
pym/portage/sync/modules/rsync/rsync.py | 8 +++++++- |
13 |
1 file changed, 7 insertions(+), 1 deletion(-) |
14 |
|
15 |
diff --git a/pym/portage/sync/modules/rsync/rsync.py b/pym/portage/sync/modules/rsync/rsync.py |
16 |
index 7c020a563..69e4be734 100644 |
17 |
--- a/pym/portage/sync/modules/rsync/rsync.py |
18 |
+++ b/pym/portage/sync/modules/rsync/rsync.py |
19 |
@@ -13,6 +13,7 @@ import tempfile |
20 |
import portage |
21 |
from portage import os |
22 |
from portage import _unicode_decode |
23 |
+from portage.exception import CommandNotFound |
24 |
from portage.util import writemsg_level |
25 |
from portage.output import create_color_func, yellow, blue, bold |
26 |
good = create_color_func("GOOD") |
27 |
@@ -277,7 +278,12 @@ class RsyncSync(NewBase): |
28 |
command += ['-K', self.repo.openpgp_key_path] |
29 |
if self.verify_jobs is not None: |
30 |
command += ['-j', self.verify_jobs] |
31 |
- exitcode = portage.process.spawn(command, **self.spawn_kwargs) |
32 |
+ try: |
33 |
+ exitcode = portage.process.spawn(command, **self.spawn_kwargs) |
34 |
+ except CommandNotFound as e: |
35 |
+ writemsg_level("!!! Command not found: %s\n" % (command[0],), |
36 |
+ level=logging.ERROR, noiselevel=-1) |
37 |
+ exitcode = 127 |
38 |
|
39 |
return (exitcode, updatecache_flg) |