From: Zac Medico Date: Thu, 10 Dec 2009 05:49:06 +0000 (-0000) Subject: Fix introspection code in fetch() so that it works correctly when myuris is X-Git-Tag: v2.1.7.13 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=74a1223255e752a64b45dfff217af4f50807c590;p=portage.git Fix introspection code in fetch() so that it works correctly when myuris is an OrderedDict instance. This fixes broken fetching for some packages. (trunk r15019) svn path=/main/branches/2.1.7/; revision=15020 --- diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 8518b4795..cb6ce4e97 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -4511,7 +4511,8 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks", locations = mymirrors file_uri_tuples = [] - if isinstance(myuris, dict): + # Check for 'items' attribute since OrderedDict is not a dict. + if hasattr(myuris, 'items'): for myfile, uri_set in myuris.items(): for myuri in uri_set: file_uri_tuples.append((myfile, myuri))