1 |
--- |
2 |
pym/portage/sync/modules/rsync/rsync.py | 11 ++++++++++- |
3 |
1 file changed, 10 insertions(+), 1 deletion(-) |
4 |
|
5 |
diff --git a/pym/portage/sync/modules/rsync/rsync.py b/pym/portage/sync/modules/rsync/rsync.py |
6 |
index 4471f5bbe..ec28af366 100644 |
7 |
--- a/pym/portage/sync/modules/rsync/rsync.py |
8 |
+++ b/pym/portage/sync/modules/rsync/rsync.py |
9 |
@@ -92,6 +92,15 @@ class RsyncSync(NewBase): |
10 |
# Support overriding job count. |
11 |
self.verify_jobs = self.repo.module_specific_options.get( |
12 |
'sync-rsync-verify-jobs', None) |
13 |
+ if self.verify_jobs is not None: |
14 |
+ try: |
15 |
+ self.verify_jobs = int(self.verify_jobs) |
16 |
+ if self.verify_jobs <= 0: |
17 |
+ raise ValueError(self.verify_jobs) |
18 |
+ except ValueError: |
19 |
+ writemsg_level("!!! sync-rsync-verify-jobs not a positive integer: %s\n" % (self.verify_jobs,), |
20 |
+ level=logging.WARNING, noiselevel=-1) |
21 |
+ self.verify_jobs = None |
22 |
|
23 |
# Real local timestamp file. |
24 |
self.servertimestampfile = os.path.join( |
25 |
@@ -280,7 +289,7 @@ class RsyncSync(NewBase): |
26 |
if self.repo.sync_openpgp_key_path is not None: |
27 |
command += ['-K', self.repo.sync_openpgp_key_path] |
28 |
if self.verify_jobs is not None: |
29 |
- command += ['-j', self.verify_jobs] |
30 |
+ command += ['-j', str(self.verify_jobs)] |
31 |
try: |
32 |
exitcode = portage.process.spawn(command, **self.spawn_kwargs) |
33 |
except CommandNotFound as e: |
34 |
-- |
35 |
2.16.1 |