# to calculate the number of pages requested, according to the following
# equation: cache_bytes = page_bytes * page_count
cache_bytes = 1024 * 1024 * 10
- _db_table = None
+ _EMPTY_STRING = _unicode_decode("")
def __init__(self, *args, **config):
super(database, self).__init__(*args, **config)
raise KeyError(cpv)
else:
raise cache_errors.CacheCorruption(cpv, "key is not unique")
+ result = result[0]
d = {}
allowed_keys_set = self._allowed_keys_set
for column_index, column_info in enumerate(cursor.description):
k = column_info[0]
if k in allowed_keys_set:
- d[k] = result[0][column_index]
+ v = result[column_index]
+ if v is None:
+ # This happens after a new empty column has been added.
+ v = self._EMPTY_STRING
+ d[k] = v
return d