From a57a2a77dc5101ca3c62700e7bca4eaf4e25fd5c Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Wed, 2 Jul 2014 22:43:46 +0200 Subject: Docs and comments impoved --- beinc_weechat.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'beinc_weechat.py') diff --git a/beinc_weechat.py b/beinc_weechat.py index 71d4b10..14e6eac 100644 --- a/beinc_weechat.py +++ b/beinc_weechat.py @@ -488,6 +488,11 @@ def beinc_privmsg_handler(data, signal, signal_data): def beinc_init(): + """ + Ran every time the script is (re)loaded + It loads the config (.json) file and (re)loads its contents into memory + beinc_init() will disable all notifications on failure + """ global enabled global target_list @@ -543,8 +548,9 @@ def beinc_init(): beinc_prnt('BEINC target "{0}" added'.format(new_target.name)) beinc_prnt('Done!') except Exception as e: - beinc_prnt('ERROR: unable to parse {0}: {1} - {2}'.format( - beinc_config_file_str, custom_error, e)) + beinc_prnt('ERROR: unable to parse {0}: {1} - {2}\n' + 'BEINC is now disabled'.format( + beinc_config_file_str, custom_error, e)) enabled = False # do not return error / exit the script # in order to give a smoother opportunity to fix a 'broken' config -- cgit v1.3