Enable tilde and environment variable expansion on some items
Expand environment variables in the following configuration items: - general.pythonfile; - general.metadata; - mbnames.filename; - Repository.localfolders. - Repository.sslcacertfile. Make tilde and environment variable expansion in the following configuration items: - Repository.sslclientcert; - Repository.sslclientkey. GitHub pull request: https://github.com/OfflineIMAP/offlineimap/pull/113 Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
This commit is contained in:
@ -94,7 +94,7 @@ class CustomConfigParser(SafeConfigParser):
|
||||
return default
|
||||
|
||||
def getmetadatadir(self):
|
||||
xforms = [os.path.expanduser]
|
||||
xforms = [os.path.expanduser, os.path.expandvars]
|
||||
d = self.getdefault("general", "metadata", "~/.offlineimap")
|
||||
metadatadir = self.apply_xforms(d, xforms)
|
||||
if not os.path.exists(metadatadir):
|
||||
@ -102,7 +102,7 @@ class CustomConfigParser(SafeConfigParser):
|
||||
return metadatadir
|
||||
|
||||
def getlocaleval(self):
|
||||
xforms = [os.path.expanduser]
|
||||
xforms = [os.path.expanduser, os.path.expandvars]
|
||||
if self.has_option("general", "pythonfile"):
|
||||
path = self.apply_xforms(self.get("general", "pythonfile"), xforms)
|
||||
else:
|
||||
|
Reference in New Issue
Block a user