Merge branch 'master' of https://github.com/webnotes/erpnext
diff --git a/setup/doctype/backup_manager/backup_dropbox.py b/setup/doctype/backup_manager/backup_dropbox.py
index 2c7fda6..b668803 100644
--- a/setup/doctype/backup_manager/backup_dropbox.py
+++ b/setup/doctype/backup_manager/backup_dropbox.py
@@ -86,6 +86,8 @@
filename = os.path.join(get_base_path(), "public", "files")
for filename in os.listdir(filename):
found = False
+ pth=path1+'/'+filename
+ size=os.stat(pth).st_size
for file_metadata in response["contents"]:
if filename==os.path.basename(file_metadata["path"]):
if os.stat(filename).st_size==file_metadata["bytes"]:
@@ -119,4 +121,4 @@
response = dropbox_client.put_file(folder + "/" + os.path.basename(filename), f, overwrite=True)
if __name__=="__main__":
- backup_to_dropbox()
\ No newline at end of file
+ backup_to_dropbox()
diff --git a/setup/doctype/backup_manager/backup_manager.py b/setup/doctype/backup_manager/backup_manager.py
index 213aa85..69de823 100644
--- a/setup/doctype/backup_manager/backup_manager.py
+++ b/setup/doctype/backup_manager/backup_manager.py
@@ -30,6 +30,7 @@
backup_to_dropbox()
send_email(True, "Dropbox")
except Exception, e:
+ webnotes.errprint(e)
send_email(False, "Dropbox", e)
#backup to gdrive
@@ -55,9 +56,10 @@
failed.</p>
<p>Error message: %s</p>
<p>Please contact your system manager for more information.</p>
- """ % (service_name, error_status)
+ <p>Detailed Error Trace: %s</p>""" % \
+ (service_name, error_status, getTraceback().replace("\n", "<br>"))
# email system managers
from webnotes.utils.email_lib import sendmail
sendmail(webnotes.conn.get_value("Backup Manager", None, "send_notifications_to").split(","),
- subject=subject, msg=message)
\ No newline at end of file
+ subject=subject, msg=message)