pym/portage/package/ebuild/fetch.py: Factor out _get_checksum_failure_max_tries
authorW. Trevor King <wking@tremily.us>
Sun, 19 Jan 2014 00:11:04 +0000 (16:11 -0800)
committerW. Trevor King <wking@tremily.us>
Mon, 20 Jan 2014 02:50:45 +0000 (18:50 -0800)
commita57bca0acfabcc6a154a1d6fc5b4b1a2737220f7
treeca33eeca557ff6cdb8521175040c73e5a05bbd0d
parent08cd954a46def397ca7aa62e5f738cd2fa77a228
pym/portage/package/ebuild/fetch.py: Factor out _get_checksum_failure_max_tries

The current fetch() function is quite long, which makes it hard to
know what I can change without adverse side effects.  By pulling this
logic out of the main function, we get clearer logic in fetch() and
more explicit input for the config extraction.

Following a suggestion by Tom Wijsman, I put the setting name in a new
'key' variable to cut down on the PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS
noise.
pym/portage/package/ebuild/fetch.py
pym/portage/tests/ebuild/test_fetch.py [new file with mode: 0644]