diff options
author | Valentin David <valentin.david@codethink.co.uk> | 2018-05-03 12:22:31 +0200 |
---|---|---|
committer | Valentin David <valentin.david@codethink.co.uk> | 2018-05-03 12:46:05 +0200 |
commit | d0add42f481547dc11f94e567f05dd49f5c66612 (patch) | |
tree | e037253f2cbaf096f6c1160428cbd27a42998777 | |
parent | f00a435ce51e9fe929615a34be82bbd77d8f1c12 (diff) | |
download | buildstream-valentindavid/385_vte_notification.tar.gz |
buildstream/_frontend/app.py: Notify VTE on failure in interactive mode.valentindavid/385_vte_notification
Fixes #385.
-rw-r--r-- | buildstream/_frontend/app.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/buildstream/_frontend/app.py b/buildstream/_frontend/app.py index c32f8c90b..9b17b05ed 100644 --- a/buildstream/_frontend/app.py +++ b/buildstream/_frontend/app.py @@ -693,6 +693,8 @@ class App(): while choice not in ['continue', 'quit', 'terminate', 'retry']: click.echo(summary, err=True) + self._notify("Buildstream failure", "{} on element {}".format(failure.action_name, element.name)) + try: choice = click.prompt("Choice:", default='continue', err=True, value_proc=_prefix_choice_value_proc(choices)) @@ -942,6 +944,9 @@ class App(): return (project_name, format_version, element_path) + def _notify(self, title, text): + click.echo("\033]777;notify;{};{}\007".format(title, text)) + # # Return a value processor for partial choice matching. |