[backup manager] [error handling] on error, send complete traceback as email

This commit is contained in:
Anand Doshi 2013-04-23 12:30:38 +05:30
parent 6f83e77010
commit 890265928b

View File

@ -27,8 +27,8 @@ def take_backups_dropbox():
from setup.doctype.backup_manager.backup_dropbox import backup_to_dropbox
backup_to_dropbox()
send_email(True, "Dropbox")
except Exception, e:
send_email(False, "Dropbox", e)
except Exception:
send_email(False, "Dropbox", webnotes.getTraceback())
#backup to gdrive
@webnotes.whitelist()
@ -37,8 +37,8 @@ def take_backups_gdrive():
from setup.doctype.backup_manager.backup_googledrive import backup_to_gdrive
backup_to_gdrive()
send_email(True, "Google Drive")
except Exception, e:
send_email(False, "Google Drive", e)
except Exception:
send_email(False, "Google Drive", webnotes.getTraceback())
def send_email(success, service_name, error_status=None):
if success: