summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gentoo.org>2005-09-24 18:51:48 +0000
committerBrian Harring <ferringb@gentoo.org>2005-09-24 18:51:48 +0000
commitd2ccf4135a8ae3e326804b7fc0167e0b51bb59b3 (patch)
tree7724801094952f067834067bd9a5034ed6d24fb9
parent7a8804d95f8900cd2d05aead6476ae55c253e81c (diff)
downloadportage-d2ccf4135a8ae3e326804b7fc0167e0b51bb59b3.tar.gz
portage-d2ccf4135a8ae3e326804b7fc0167e0b51bb59b3.tar.bz2
portage-d2ccf4135a8ae3e326804b7fc0167e0b51bb59b3.zip
update so that int 0 is stored (change to the logic test for storing null vals)
svn path=/main/branches/2.0/; revision=2024
-rw-r--r--pym/portage_db_flat_hash.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage_db_flat_hash.py b/pym/portage_db_flat_hash.py
index 8ee7661ff..44ed59da6 100644
--- a/pym/portage_db_flat_hash.py
+++ b/pym/portage_db_flat_hash.py
@@ -24,14 +24,14 @@ class database(portage_db_flat.database):
mydict = {}
for x in self.dbkeys:
- mydict[x] = data.get(x, "")
+ mydict[x] = str(data.get(x, ""))
mydict["_mtime_"] = long(data["_mtime_"])
return mydict
def set_values(self, key, values):
l = []
for x in values.keys():
- if values[x] and x != "_mtime_":
+ if values[x] not in (None, '') and x != "_mtime_":
l.append("%s=%s\n" % (x, values[x]))
l.append(values["_mtime_"])
portage_db_flat.database.set_values(self, key, l, raw=True)