diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-03-18 04:51:19 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-03-18 04:51:19 +0300 |
commit | 9bdf3e70ee7b28c67e3b783d92a170806f126494 (patch) | |
tree | 213bc5f1c7bbfa59a8ddb0a2d8f856bcac4b0e9c /suddenly-opened-ports-checker | |
parent | 5644c9273136cefb26f93e9840e05ab8565fe0be (diff) |
fix error format
Diffstat (limited to 'suddenly-opened-ports-checker')
-rwxr-xr-x | suddenly-opened-ports-checker | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/suddenly-opened-ports-checker b/suddenly-opened-ports-checker index 8e14845..f70cee5 100755 --- a/suddenly-opened-ports-checker +++ b/suddenly-opened-ports-checker @@ -3,6 +3,7 @@ import logging import yaml import math import html +import traceback from argparse import ArgumentParser from lib.worker import Worker @@ -88,10 +89,12 @@ def main(): pass except Exception as e: if not args.no_telegram: - telegram_notify(html.escape(str(e)), + telegram_notify(html.escape(traceback.format_exc()), parse_mode='html', chat_id=config['telegram']['chat-id'], token=config['telegram']['token']) + else: + traceback.print_exc() if __name__ == '__main__': |