From ae2ce62be30af6c3bcee223b5892dc4276c1dbae Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 31 Aug 2011 14:48:00 +0530 Subject: [PATCH] sent patch error notification only if admin_email_notification is on --- cgi-bin/webnotes/modules/patch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cgi-bin/webnotes/modules/patch.py b/cgi-bin/webnotes/modules/patch.py index 5ecd84446c..0b6810f62b 100644 --- a/cgi-bin/webnotes/modules/patch.py +++ b/cgi-bin/webnotes/modules/patch.py @@ -34,4 +34,5 @@ def write_log(): from webnotes.utils import sendmail subj = 'Error in running patches in %s' % webnotes.conn.cur_db_name msg = subj + '

Login User: ' + webnotes.user.name + '

' + webnotes.getTraceback() - sendmail(['developer@erpnext.com'], sender='automail@erpnext.com', subject= subj, parts=[['text/plain', msg]]) + if getattr(webnotes.defs,'admin_email_notification',1): + sendmail(['developers@erpnext.com'], sender='automail@erpnext.com', subject= subj, parts=[['text/plain', msg]])