Fix concatenation of list + tuple in Manifest._createManifestEntries().
authorZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 19:49:24 +0000 (19:49 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 19:49:24 +0000 (19:49 -0000)
(trunk r15289)

svn path=/main/branches/2.1.7/; revision=15528

pym/portage/manifest.py

index fc8afb4cf5bcfda8bcd3334910f08f7b70c1c82b..470f732d6850278d179f6b884f6c2b6861a3e3d7 100644 (file)
@@ -205,6 +205,8 @@ class Manifest(object):
                return myhashdict
 
        def _createManifestEntries(self):
+               valid_hashes = set(portage.const.MANIFEST2_HASH_FUNCTIONS)
+               valid_hashes.add('size')
                mytypes = list(self.fhashdict)
                mytypes.sort()
                for t in mytypes:
@@ -213,10 +215,8 @@ class Manifest(object):
                        for f in myfiles:
                                myentry = Manifest2Entry(
                                        type=t, name=f, hashes=self.fhashdict[t][f].copy())
-                               myhashkeys = list(myentry.hashes)
-                               myhashkeys.sort()
-                               for h in myhashkeys:
-                                       if h not in ["size"] + portage.const.MANIFEST2_HASH_FUNCTIONS:
+                               for h in list(myentry.hashes):
+                                       if h not in valid_hashes:
                                                del myentry.hashes[h]
                                yield myentry