UseManager: convert lists to tuples
authorZac Medico <zmedico@gentoo.org>
Sat, 27 Nov 2010 07:17:49 +0000 (23:17 -0800)
committerZac Medico <zmedico@gentoo.org>
Sat, 27 Nov 2010 07:17:49 +0000 (23:17 -0800)
pym/portage/package/ebuild/_config/UseManager.py

index ff206e536c97c6f21973c24b2c01716456aec98d..0939dadb35f3046dc353081aa58f459027de01b1 100644 (file)
@@ -55,7 +55,7 @@ class UseManager(object):
                        pusedict = grabdict_package(
                                os.path.join(location, file_name), recursive=1, allow_wildcard=True, allow_repo=True, verify_eapi=False)
                        for k, v in pusedict.items():
-                               ret.setdefault(k.cp, {})[k] = v
+                               ret.setdefault(k.cp, {})[k] = tuple(v)
 
                return ret
 
@@ -103,9 +103,11 @@ class UseManager(object):
                        for k, v in profile_dict.items():
                                if juststrings:
                                        v = " ".join(v)
+                               else:
+                                       v = tuple(v)
                                cpdict.setdefault(k.cp, {})[k] = v
                        ret.append(cpdict)
-               return ret
+               return tuple(ret)
 
        def getUseMask(self, pkg=None):
                if pkg is None: