NAUbackup / VmBackup

XenServer simple backup script
228 stars 61 forks source link

Exception on email sending when some backups are in "WARNING" state #31

Closed rudolfmayer closed 6 years ago

rudolfmayer commented 7 years ago

When there is a warning state in the backups, E-Mail sending fails with this exception

***ERROR EXCEPTION - exceptions.TypeError
***ERROR NOTE: see VmBackup output for details
Traceback (most recent call last): 
  File "/opt/VmBackup/VmBackup.py", line 1360, in ?
    main(session)
  File "/opt/VmBackup/VmBackup.py", line 440, in main
    send_email("%s 'WARNING VmBackup.py' %s" % (MAIL_TO_ADDR, STATUS_LOG))
TypeError: send_email() takes exactly 3 arguments (1 given)

The faulty statement seems to be in https://github.com/NAUbackup/VmBackup/blob/master/VmBackup.py#L440

NAUbackup commented 7 years ago

Thank you, Rudolf, for pointing this out. We will take a look ASAP.

Could you please try changing line 440 to read instead:

send_email(MAIL_TO_ADDR, 'WARNING VmBackup.py', STATUS_LOG)

and running the script again to see if that fixes it? Thank you!

NAUbackup commented 6 years ago

Have not heard further issues with this, and hence I am closing it for now.