[IMP] config: allow defining addon_path in multiline

With a config like
[options]
addons_path: ~/foo,
	     ~/bar

'~/bar' was interprated as '\n    ~/bar' and is considered as a local directory
by os.path.abspath

Fixes #4403
This commit is contained in:
Antonio Espinosa
2014-12-23 16:37:16 +01:00
committed by Martin Trigaux
parent 4b387e73cb
commit 1656a7e503
+1 -1
View File
@@ -449,7 +449,7 @@ class configmanager(object):
self.options['addons_path'] = '%s,%s' % (base_addons, main_addons)
else:
self.options['addons_path'] = ",".join(
os.path.abspath(os.path.expanduser(os.path.expandvars(x)))
os.path.abspath(os.path.expanduser(os.path.expandvars(x.strip())))
for x in self.options['addons_path'].split(','))
self.options['init'] = opt.init and dict.fromkeys(opt.init.split(','), 1) or {}