fix error format
This commit is contained in:
parent
5644c92731
commit
9bdf3e70ee
@ -3,6 +3,7 @@ import logging
|
|||||||
import yaml
|
import yaml
|
||||||
import math
|
import math
|
||||||
import html
|
import html
|
||||||
|
import traceback
|
||||||
|
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from lib.worker import Worker
|
from lib.worker import Worker
|
||||||
@ -88,10 +89,12 @@ def main():
|
|||||||
pass
|
pass
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if not args.no_telegram:
|
if not args.no_telegram:
|
||||||
telegram_notify(html.escape(str(e)),
|
telegram_notify(html.escape(traceback.format_exc()),
|
||||||
parse_mode='html',
|
parse_mode='html',
|
||||||
chat_id=config['telegram']['chat-id'],
|
chat_id=config['telegram']['chat-id'],
|
||||||
token=config['telegram']['token'])
|
token=config['telegram']['token'])
|
||||||
|
else:
|
||||||
|
traceback.print_exc()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user