Gentoo Archives: gentoo-portage-dev

From: "W. Trevor King" <wking@×××××××.us>
To: Tom Wijsman <TomWij@g.o>
Cc: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH 1/3] pym/portage/package/ebuild/fetch.py: Factor out _get_checksum_failure_max_tries
Date: Mon, 20 Jan 2014 01:56:33
Message-Id: 20140120015628.GY29063@odin.tremily.us
In Reply to: Re: [gentoo-portage-dev] [PATCH 1/3] pym/portage/package/ebuild/fetch.py: Factor out _get_checksum_failure_max_tries by Tom Wijsman
1 On Mon, Jan 20, 2014 at 02:26:59AM +0100, Tom Wijsman wrote:
2 > On Sat, 18 Jan 2014 19:07:45 -0800
3 > "W. Trevor King" <wking@×××××××.us> wrote:
4 >
5 > > [...SNIP...]
6 > > + v =
7 > > int(settings.get("PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS",
8 > > + default))
9 > > …
10 >
11 > The code screams PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS to me which
12 > makes it hard to read, …
13
14 That's all copy-pasted out of fetch() under the assumption that the
15 fewer changes I made (besides creating _get_checksum_failure_max_tries
16 at all), the easier it would be to review those changes. Perhaps I
17 was mistaken ;).
18
19 > I would suggest assigning it to a variable in advance as to not have
20 > to repeat it this often. Some code snippets for ideas:
21 >
22 > key = "PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS"
23
24 Will queue to v3.
25
26 Cheers,
27 Trevor
28
29 --
30 This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
31 For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

Attachments

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