1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-09 00:40:11 +01:00

Only expand paths on config items that can actually be paths

This commit is contained in:
Daniel Martí 2014-09-15 12:39:42 +02:00
parent 88dc0b2bb5
commit 37aa3a7b99

View File

@ -79,10 +79,9 @@ def fill_config_defaults(config):
if k not in config:
config[k] = v
# Expand environment variables
for k, v in config.items():
if type(v) != str:
continue
# Expand paths (~users and $vars)
for k in ['sdk_path', 'ndk_path', 'ant', 'mvn3', 'gradle', 'keystore', 'repo_icon']:
v = config[k]
orig = v
v = os.path.expanduser(v)
v = os.path.expandvars(v)