Remove unnecessary setting of default values to empty strings inside
authorZac Medico <zmedico@gentoo.org>
Thu, 5 Mar 2009 04:28:15 +0000 (04:28 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 5 Mar 2009 04:28:15 +0000 (04:28 -0000)
database._getitem().

svn path=/main/trunk/; revision=12756

pym/portage/cache/metadata.py
pym/portage/cache/sqlite.py

index 8f7992472c2ac65cbd389addf7acc936b1c35bad..22cf51e56c82e729bb02910354ec8258e6d055a8 100644 (file)
@@ -69,9 +69,6 @@ class database(flat_hash.database):
                        # because it calls reconstruct_eclasses() internally.
                        d["_eclasses_"] = reconstruct_eclasses(None, d["_eclasses_"])
 
-               for x in self._known_keys:
-                       d.setdefault(x, '')
-
                return d
 
        def _setitem(self, cpv, values):
index 5a7bcf1f5d652fca4b2209e64fd8c3dfa8052f4b..3e287f7ba7e7dd08226accf4037b5b504c027e63 100644 (file)
@@ -169,8 +169,6 @@ class database(fs_template.FsBased):
                                d[k]=str(d[k]) # convert unicode strings to normal
                        except UnicodeEncodeError, e:
                                pass #writemsg("%s: %s\n" % (cpv, str(e)))
-               for x in self._known_keys:
-                       d.setdefault(x,'')
                return d
 
        def _setitem(self, cpv, values):