summaryrefslogtreecommitdiff
path: root/beinc_weechat.py
diff options
context:
space:
mode:
authorSimeon Simeonov2014-07-02 22:43:46 +0200
committerSimeon Simeonov2014-07-02 22:43:46 +0200
commita57a2a77dc5101ca3c62700e7bca4eaf4e25fd5c (patch)
treee9c997be8064a7eaf19b213a6208dc252e557f61 /beinc_weechat.py
parent60facea6194cf2c93c55580e9e9e60c304c9c6a8 (diff)
Docs and comments impoved
Diffstat (limited to 'beinc_weechat.py')
-rw-r--r--beinc_weechat.py10
1 files changed, 8 insertions, 2 deletions
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):
488 488
489 489
490def beinc_init(): 490def beinc_init():
491 """
492 Ran every time the script is (re)loaded
493 It loads the config (.json) file and (re)loads its contents into memory
494 beinc_init() will disable all notifications on failure
495 """
491 496
492 global enabled 497 global enabled
493 global target_list 498 global target_list
@@ -543,8 +548,9 @@ def beinc_init():
543 beinc_prnt('BEINC target "{0}" added'.format(new_target.name)) 548 beinc_prnt('BEINC target "{0}" added'.format(new_target.name))
544 beinc_prnt('Done!') 549 beinc_prnt('Done!')
545 except Exception as e: 550 except Exception as e:
546 beinc_prnt('ERROR: unable to parse {0}: {1} - {2}'.format( 551 beinc_prnt('ERROR: unable to parse {0}: {1} - {2}\n'
547 beinc_config_file_str, custom_error, e)) 552 'BEINC is now disabled'.format(
553 beinc_config_file_str, custom_error, e))
548 enabled = False 554 enabled = False
549 # do not return error / exit the script 555 # do not return error / exit the script
550 # in order to give a smoother opportunity to fix a 'broken' config 556 # in order to give a smoother opportunity to fix a 'broken' config