chore: code cleanup
This commit is contained in:
parent
e2e76055d8
commit
babefc7380
1 changed files with 2 additions and 2 deletions
|
|
@ -173,7 +173,7 @@ def upload_system_backup_to_google_drive():
|
|||
try:
|
||||
media = MediaFileUpload(get_absolute_path(fileurl, True), mimetype="application/gzip", resumable=True)
|
||||
except IOError as e:
|
||||
frappe.throw(_("Google Drive - Could not locate locate - {0}").format(os.path.basename(e)))
|
||||
frappe.throw(_("Google Drive - Could not locate locate - {0}").format(e))
|
||||
|
||||
try:
|
||||
progress(2, "Uploading backup to Google Drive.")
|
||||
|
|
@ -213,7 +213,7 @@ def upload_file_to_google_drive(google_drive, account, fileurl, is_private):
|
|||
try:
|
||||
media = MediaFileUpload(get_absolute_path(filename, is_private), mimetype="application/pdf", resumable=True)
|
||||
except IOError as e:
|
||||
frappe.msgprint(_("Google Drive - Could not locate file - {0}").format(os.path.basename(e)))
|
||||
frappe.msgprint(_("Google Drive - Could not locate file - {0}").format(e))
|
||||
|
||||
try:
|
||||
google_drive.files().create(body=file_metadata, media_body=media, fields="id").execute()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue