Skip to content

Commit

Permalink
Better error handling
Browse files Browse the repository at this point in the history
Compiling to standalone exe (mitigates Issue #9)
Bug fixes
  • Loading branch information
mcoles committed Oct 7, 2016
1 parent 990d11e commit ca125b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vizalerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,11 @@ def main(configfile=u'.\\config\\vizalerts.yaml',
cleanup_dir(configs['log.dir'], configs['log.dir.file_retention_seconds'])
except OSError as e:
# Send mail to the admin informing them of the problem, but don't quit
errormessage = u'OSError: Unable to cleanup log directory {}, error: {}'.format(configs['temp.dir'], e)
errormessage = u'OSError: Unable to cleanup log directory {}, error: {}'.format(configs['log.dir'], e)
logger.error(errormessage)
send_email(configs['smtp.address.from'], configs['smtp.address.to'], configs['smtp.subject'], errormessage)
except Exception as e:
errormessage = u'Unable to cleanup log directory {}, error: {}'.format(configs['temp.dir'], e)
errormessage = u'Unable to cleanup log directory {}, error: {}'.format(configs['log.dir'], e)
logger.error(errormessage)
send_email(configs['smtp.address.from'], configs['smtp.address.to'], configs['smtp.subject'], errormessage)

Expand Down

0 comments on commit ca125b6

Please sign in to comment.