def process_result_value(self, value, dialect): from rezine.utils.zeml import load_parser_data try: return load_parser_data(value) except ValueError: # Parser data invalid. Database corruption? from rezine.i18n import _ from rezine.utils import log log.exception(_(u'Error when loading parsed data from database. ' u'Maybe the database was manually edited and got ' u'corrupted? The system returned an empty value.')) return {}
def process_result_value(self, value, dialect): from rezine.utils.zeml import load_parser_data try: return load_parser_data(value) except ValueError: # Parser data invalid. Database corruption? from rezine.i18n import _ from rezine.utils import log log.exception( _(u'Error when loading parsed data from database. ' u'Maybe the database was manually edited and got ' u'corrupted? The system returned an empty value.')) return {}
def _parser_data(value): if value: return load_parser_data(value.decode('base64'))