From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/sync/modules/rsync/
Date: Mon, 5 Feb 2018 18:44:47 +0000 (UTC) [thread overview]
Message-ID: <1517856024.860b7f9d703c080451892f5d988636320bb11bc8.mgorny@gentoo> (raw)
commit: 860b7f9d703c080451892f5d988636320bb11bc8
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 1 09:27:22 2018 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Feb 5 18:40:24 2018 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=860b7f9d
rsync: Verify the value of sync-rsync-verify-jobs
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>
pym/portage/sync/modules/rsync/rsync.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/pym/portage/sync/modules/rsync/rsync.py b/pym/portage/sync/modules/rsync/rsync.py
index 4471f5bbe..ec28af366 100644
--- a/pym/portage/sync/modules/rsync/rsync.py
+++ b/pym/portage/sync/modules/rsync/rsync.py
@@ -92,6 +92,15 @@ class RsyncSync(NewBase):
# Support overriding job count.
self.verify_jobs = self.repo.module_specific_options.get(
'sync-rsync-verify-jobs', None)
+ if self.verify_jobs is not None:
+ try:
+ self.verify_jobs = int(self.verify_jobs)
+ if self.verify_jobs <= 0:
+ raise ValueError(self.verify_jobs)
+ except ValueError:
+ writemsg_level("!!! sync-rsync-verify-jobs not a positive integer: %s\n" % (self.verify_jobs,),
+ level=logging.WARNING, noiselevel=-1)
+ self.verify_jobs = None
# Real local timestamp file.
self.servertimestampfile = os.path.join(
@@ -280,7 +289,7 @@ class RsyncSync(NewBase):
if self.repo.sync_openpgp_key_path is not None:
command += ['-K', self.repo.sync_openpgp_key_path]
if self.verify_jobs is not None:
- command += ['-j', self.verify_jobs]
+ command += ['-j', str(self.verify_jobs)]
try:
exitcode = portage.process.spawn(command, **self.spawn_kwargs)
except CommandNotFound as e:
next reply other threads:[~2018-02-05 18:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-05 18:44 Michał Górny [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-05-07 8:21 [gentoo-commits] proj/portage:master commit in: pym/portage/sync/modules/rsync/ Zac Medico
2018-05-03 6:39 Zac Medico
2018-05-01 19:53 Zac Medico
2018-02-05 18:44 Michał Górny
2018-02-05 18:44 Michał Górny
2018-02-05 18:44 Michał Górny
2018-02-05 18:44 Michał Górny
2018-01-31 23:39 Zac Medico
2018-01-31 22:24 Zac Medico
2017-10-27 19:45 Zac Medico
2015-11-07 18:24 Zac Medico
2015-07-14 21:31 Brian Dolbec
2015-05-18 23:19 Brian Dolbec
2015-02-09 20:12 Brian Dolbec
2014-12-04 20:04 [gentoo-commits] proj/portage:plugin-sync " Brian Dolbec
2014-12-04 20:16 ` [gentoo-commits] proj/portage:master " Brian Dolbec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1517856024.860b7f9d703c080451892f5d988636320bb11bc8.mgorny@gentoo \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox