Test for basestring instead of types.DictType so that the test more generic.
authorZac Medico <zmedico@gentoo.org>
Thu, 26 Oct 2006 06:39:47 +0000 (06:39 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 26 Oct 2006 06:39:47 +0000 (06:39 -0000)
svn path=/main/trunk/; revision=4820

pym/cache/metadata.py

index a190cb8834b50916358c0ceb3ea7d58f887203b4..df039d5e28c2125c3489659708dc4a70cca31ffc 100644 (file)
@@ -66,7 +66,7 @@ class database(flat_hash.database):
                        if "INHERITED" in d:
                                d["_eclasses_"] = self.ec.get_eclass_data(d["INHERITED"].split(), from_master_only=True)
                                del d["INHERITED"]
-               elif not isinstance(d["_eclasses_"], types.DictType):
+               elif isinstance(d["_eclasses_"], basestring):
                        # We skip this if flat_hash.database._parse_data() was called above
                        # because it calls reconstruct_eclasses() internally.
                        d["_eclasses_"] = reconstruct_eclasses(None, d["_eclasses_"])