1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-09-19 03:30:12 +02: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: if k not in config:
config[k] = v config[k] = v
# Expand environment variables # Expand paths (~users and $vars)
for k, v in config.items(): for k in ['sdk_path', 'ndk_path', 'ant', 'mvn3', 'gradle', 'keystore', 'repo_icon']:
if type(v) != str: v = config[k]
continue
orig = v orig = v
v = os.path.expanduser(v) v = os.path.expanduser(v)
v = os.path.expandvars(v) v = os.path.expandvars(v)