Gentoo Archives: gentoo-portage-dev

From: "M. J. Everitt" <m.j.everitt@×××.org>
To: gentoo-portage-dev@l.g.o, "Michał Górny" <mgorny@g.o>
Subject: Re: [gentoo-portage-dev] [PATCH v2 6/9] rsync: Issue an explicit warning if Manifest timestamp is >24hr old
Date: Sun, 04 Feb 2018 13:49:05
Message-Id: a9bac441-50b4-7fb5-5a2f-4257c6716adb@iee.org
In Reply to: [gentoo-portage-dev] [PATCH v2 6/9] rsync: Issue an explicit warning if Manifest timestamp is >24hr old by "Michał Górny"
1 On 02/02/18 20:42, Michał Górny wrote[excerpted]:
2 > index 27a2548c0..cb80f6d66 100644
3 > --- a/pym/portage/sync/modules/rsync/__init__.py
4 > +++ b/pym/portage/sync/modules/rsync/__init__.py
5 > @@ -109,6 +110,20 @@ class RsyncSync(NewBase):
6 > writemsg_level("!!! sync-rsync-verify-jobs not a positive integer: %s\n" % (self.verify_jobs,),
7 > level=logging.WARNING, noiselevel=-1)
8 > self.verify_jobs = None
9 > + # Support overriding max age.
10 > + self.max_age = self.repo.module_specific_options.get(
11 > + 'sync-rsync-verify-max-age', '')
12 > + if self.max_age:
13 > + try:
14 > + self.max_age = int(self.max_age)
15 > + if self.max_age < 0:
16 > + raise ValueError(self.max_age)
17 > + except ValueError:
18 > + writemsg_level("!!! sync-rsync-max-age not a non-negative integer: %s\n" % (self.max_age,),
19 A beautiful double-negative .. but would read better as "not a positive
20 integer" or "is a negative integer" ..
21
22 MJE

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies