summaryrefslogtreecommitdiff
path: root/alot/settings/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/settings/utils.py')
-rw-r--r--alot/settings/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/alot/settings/utils.py b/alot/settings/utils.py
index 2048a36c..3b9f1ecc 100644
--- a/alot/settings/utils.py
+++ b/alot/settings/utils.py
@@ -7,7 +7,7 @@ from urwid import AttrSpec
from .errors import ConfigError
-def read_config(configpath=None, specpath=None, checks={}):
+def read_config(configpath=None, specpath=None, checks=None):
"""
get a (validated) config object for given config file path.
@@ -21,6 +21,8 @@ def read_config(configpath=None, specpath=None, checks={}):
:raises: :class:`~alot.settings.errors.ConfigError`
:rtype: `configobj.ConfigObj`
"""
+ checks = checks or {}
+
try:
config = ConfigObj(infile=configpath, configspec=specpath,
file_error=True, encoding='UTF8')