If PORTAGE_FETCH_RESUME_MIN_SIZE is undefined or empty, silently use
authorZac Medico <zmedico@gentoo.org>
Thu, 3 Apr 2008 19:59:57 +0000 (19:59 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 3 Apr 2008 19:59:57 +0000 (19:59 -0000)
the default. (trunk r9689)

svn path=/main/branches/2.1.2/; revision=9690

pym/portage.py

index d1cf85cc7ae8161a474dc7f3ad885726d6e667a1..5739f5760d8f061b8ff73e4bc961d422a3530c93 100644 (file)
@@ -3045,6 +3045,9 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
        fetch_resume_size = mysettings.get("PORTAGE_FETCH_RESUME_MIN_SIZE")
        if fetch_resume_size is not None:
                fetch_resume_size = "".join(fetch_resume_size.split())
+               if not fetch_resume_size:
+                       # If it's undefined or empty, silently use the default.
+                       fetch_resume_size = fetch_resume_size_default
                match = _fetch_resume_size_re.match(fetch_resume_size)
                if match is None or \
                        (match.group(2).upper() not in _size_suffix_map):