summaryrefslogtreecommitdiff
path: root/alot/settings
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2012-08-01 09:05:07 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2012-08-01 09:05:07 +0100
commitf050a250526dfc38336150518819aa2d7bfadd72 (patch)
tree697eb35343f7b9eb7e24a1272e246bd1fec14be2 /alot/settings
parent0cc29f4b48dc8f128d0cdf9d3ff4e328a8dfc454 (diff)
do not write default config if missing
This has been done before to provide the default bindings, which are now read directly from defautls/default.bindings during startup.
Diffstat (limited to 'alot/settings')
-rw-r--r--alot/settings/__init__.py12
-rw-r--r--alot/settings/utils.py2
2 files changed, 1 insertions, 13 deletions
diff --git a/alot/settings/__init__.py b/alot/settings/__init__.py
index 35599fa8..a92eaf0e 100644
--- a/alot/settings/__init__.py
+++ b/alot/settings/__init__.py
@@ -102,18 +102,6 @@ class SettingsManager(object):
self._accounts = self._parse_accounts(self._config)
self._accountmap = self._account_table(self._accounts)
- def write_default_config(self, path):
- """write out defaults/config.stub to path"""
- (dir, file) = os.path.split(path)
- try:
- os.makedirs(dir)
- except OSError, e:
- if e.errno == errno.EEXIST:
- pass
- else:
- raise
- shutil.copyfile(os.path.join(DEFAULTSPATH, 'config.stub'), path)
-
def _parse_accounts(self, config):
"""
read accounts information from config
diff --git a/alot/settings/utils.py b/alot/settings/utils.py
index f6912f98..6b5f77cb 100644
--- a/alot/settings/utils.py
+++ b/alot/settings/utils.py
@@ -25,7 +25,7 @@ def read_config(configpath=None, specpath=None, checks={}):
config = ConfigObj(infile=configpath, configspec=specpath,
file_error=True, encoding='UTF8')
except (ConfigObjError, IOError):
- raise ConfigError('Couls not read %s' % configpath)
+ raise ConfigError('Could not read %s' % configpath)
except UnboundLocalError:
# this works around a bug in configobj
msg = '%s is malformed. Check for sections without parents..'