From e83bfdb333809237f18243411c3bc85babfacd2b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 15 Oct 2013 12:22:41 +0530 Subject: [PATCH] [minor] bypass plugin field related operational error --- core/doctype/custom_script/custom_script.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/doctype/custom_script/custom_script.py b/core/doctype/custom_script/custom_script.py index c94e6015be..0a5cff3670 100644 --- a/core/doctype/custom_script/custom_script.py +++ b/core/doctype/custom_script/custom_script.py @@ -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