ebuild: fetch: Factor out _get_fetch_resume_size
authorW. Trevor King <wking@tremily.us>
Sun, 19 Jan 2014 00:22:16 +0000 (16:22 -0800)
committerW. Trevor King <wking@tremily.us>
Fri, 24 Jan 2014 18:43:21 +0000 (10:43 -0800)
commit418cbd97a611d0ba42405c4f6e27d2da7650d520
tree3e867a1e89f67fcdc86ac0996c9a3a520dafb527
parentfebfd9ffa34261dc6f9926bd47fae5353d17eee2
ebuild: fetch: Factor out _get_fetch_resume_size

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_RESUME_MIN_SIZE noise.
pym/portage/package/ebuild/fetch.py
pym/portage/tests/ebuild/test_fetch.py