From 1cf22705298a358ea2a2e9afa78be69b70751951 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 10 Dec 2009 05:48:00 +0000 Subject: [PATCH] Fix introspection code in fetch() so that it works correctly when myuris is an OrderedDict instance. This fixes broken fetching for some packages. svn path=/main/trunk/; revision=15019 --- pym/portage/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 7ed9df4a6..c13a7149b 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)) -- 2.26.2