Skip to content
Snippets Groups Projects
Commit ebca88de authored by Denis Ledoux's avatar Denis Ledoux
Browse files

[FIX] google_calendar: All exceptions types do not have read method

parent db98d077
No related branches found
No related tags found
No related merge requests found
......@@ -667,7 +667,7 @@ class google_calendar(osv.AbstractModel):
registry = openerp.modules.registry.RegistryManager.get(request.session.db)
with registry.cursor() as cur:
self.pool['res.users'].write(cur, uid, [uid], {'google_calendar_last_sync_date': False}, context=context)
error_key = simplejson.loads(e.read())
error_key = simplejson.loads(str(e))
error_key = error_key.get('error', {}).get('message', 'nc')
error_msg = "Google are lost... the next synchro will be a full synchro. \n\n %s" % error_key
raise self.pool.get('res.config.settings').get_config_warning(cr, _(error_msg), context=context)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment