summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorJulian Mehne <julian.mehne@posteo.de>2018-01-07 22:26:52 +0100
committerJulian Mehne <julian.mehne@posteo.de>2018-01-07 22:38:28 +0100
commitbea1848b595572521963a3533c224909b294a7f0 (patch)
treeae528526b718f39dd25ab1d41e76035578214111 /alot
parent04bd1ed039cd17ddbea9785eee46cd25356b3eaa (diff)
Report error if configuration file cannot be reloaded.
Diffstat (limited to 'alot')
-rw-r--r--alot/commands/globals.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/alot/commands/globals.py b/alot/commands/globals.py
index 92ef3e7e..bf1cad01 100644
--- a/alot/commands/globals.py
+++ b/alot/commands/globals.py
@@ -35,7 +35,7 @@ from ..widgets.utils import DialogBox
from ..db.errors import DatabaseLockedError
from ..db.envelope import Envelope
from ..settings.const import settings
-from ..settings.errors import NoMatchingAccount
+from ..settings.errors import ConfigError, NoMatchingAccount
from ..utils import argparse as cargparse
MODE = 'global'
@@ -973,4 +973,8 @@ class ReloadCommand(Command):
"""Reload configuration."""
def apply(self, ui):
- settings.reload()
+ try:
+ settings.reload()
+ except ConfigError as e:
+ ui.notify('Error when reloading config files:\n {}'.format(e),
+ priority='error')