summaryrefslogtreecommitdiff
path: root/alot/settings
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2018-06-19 21:59:42 +0100
committerGitHub <noreply@github.com>2018-06-19 21:59:42 +0100
commit374651d84cb5767629ad4b7d3179b84bae05ab82 (patch)
treec46f606735b678ffea1dc044c3863ab499b89909 /alot/settings
parent7da905e9d3842344643091fb68850db9ca239a7a (diff)
parent802e513801ca9200addf8b2278478858d38f337b (diff)
Merge branch 'master' into future
Diffstat (limited to 'alot/settings')
-rw-r--r--alot/settings/manager.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/alot/settings/manager.py b/alot/settings/manager.py
index 3ef9eccf..1e275aeb 100644
--- a/alot/settings/manager.py
+++ b/alot/settings/manager.py
@@ -1,7 +1,7 @@
# Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com>
# This file is released under the GNU GPL, version 3 or a later revision.
# For further details see the COPYING file
-import imp
+import importlib.util
import itertools
import logging
import mailcap
@@ -88,7 +88,9 @@ class SettingsManager(object):
hooks_path = os.path.expanduser(self._config.get('hooksfile'))
try:
- self.hooks = imp.load_source('hooks', hooks_path)
+ spec = importlib.util.spec_from_file_location('hooks', hooks_path)
+ self.hooks = importlib.util.module_from_spec(spec)
+ spec.loader.exec_module(self.hooks)
except:
logging.exception('unable to load hooks file:%s', hooks_path)
if 'bindings' in newconfig: