summaryrefslogtreecommitdiff
path: root/alot/commands/globals.py
diff options
context:
space:
mode:
authorPol Van Aubel <dev@polvanaubel.com>2019-10-28 20:58:49 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2019-11-02 16:24:41 +0000
commited78f926c3495b0c89ccaf103dcc4be50be6395f (patch)
tree8bd248149aee619f9be3a3898fbf7ea2885bd217 /alot/commands/globals.py
parent244180d52f4ace8181bb288e77402c766ad620c1 (diff)
Be more informative if editor exits with error.
Implements the suggestion in #1427 to display the actual error code, and substitutes an empty stderr with "No stderr output".
Diffstat (limited to 'alot/commands/globals.py')
-rw-r--r--alot/commands/globals.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/alot/commands/globals.py b/alot/commands/globals.py
index c61015f9..05ab6427 100644
--- a/alot/commands/globals.py
+++ b/alot/commands/globals.py
@@ -304,7 +304,10 @@ class ExternalCommand(Command):
if self.on_success is not None:
self.on_success()
else:
- ui.notify(ret, priority='error')
+ msg = "editor has exited with error code {} -- {}".format(
+ proc.returncode,
+ ret or "No stderr output")
+ ui.notify(msg, priority='error')
if self.refocus and callerbuffer in ui.buffers:
logging.info('refocussing')
ui.buffer_focus(callerbuffer)