[minor] bypass plugin field related operational error

This commit is contained in:
Nabin Hait 2013-10-15 12:22:41 +05:30
parent 92b62b2fc9
commit e83bfdb333

View file

@ -18,7 +18,7 @@ class DocType:
webnotes.clear_cache(doctype=self.doc.dt)
def get_custom_server_script(doctype, plugin=None):
import os
import os, MySQLdb
custom_script = webnotes.cache().get_value("_server_script:" + doctype)
if not custom_script:
@ -30,7 +30,7 @@ def get_custom_server_script(doctype, plugin=None):
else:
custom_script = "Does Not Exist"
webnotes.cache().set_value("_server_script:" + doctype, custom_script)
except webnotes.DoesNotExistError:
except (webnotes.DoesNotExistError, MySQLdb.OperationalError):
# this happens when syncing
return None