diff options
Diffstat (limited to 'grc/gui/Messages.py')
-rw-r--r-- | grc/gui/Messages.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/grc/gui/Messages.py b/grc/gui/Messages.py index f220b6dd06..90f508d770 100644 --- a/grc/gui/Messages.py +++ b/grc/gui/Messages.py @@ -24,15 +24,17 @@ import os ## A list of functions that can receive a message. MESSENGERS_LIST = list() + def register_messenger(messenger): """ Append the given messenger to the list of messengers. Args: - messenger: a method thats takes a string + messenger: a method that takes a string """ MESSENGERS_LIST.append(messenger) + def send(message): """ Give the message to each of the messengers. @@ -102,8 +104,8 @@ def send_start_exec(file_path): def send_verbose_exec(verbose): send(verbose) -def send_end_exec(): - send('\n>>> Done\n') +def send_end_exec(returncode=0): + send('\n>>> Done%s\n' % (" (return code %s)" % returncode if returncode else "")) ################# functions for saving flow graphs ######################################## def send_fail_save(file_path): |