[MERGE] [IMP] pad: catch urllib error, instead of showing traceback display helpful error message (opw 593069)
bzr revid: mat@openerp.com-20131118125113-tuekl7jeazbv86ti
This commit is contained in:
commit
3b65fb1125
|
@ -39,7 +39,11 @@ class pad_common(osv.osv_memory):
|
|||
#if create with content
|
||||
if "field_name" in context and "model" in context and "object_id" in context:
|
||||
myPad = EtherpadLiteClient( pad["key"], pad["server"]+'/api')
|
||||
myPad.createPad(path)
|
||||
try:
|
||||
myPad.createPad(path)
|
||||
except urllib2.URLError:
|
||||
raise osv.except_osv(_("Error"), _("Pad creation fail, \
|
||||
either there is a problem with your pad server URL or with your connection."))
|
||||
|
||||
#get attr on the field model
|
||||
model = self.pool.get(context["model"])
|
||||
|
|
Loading…
Reference in New Issue