Expand user directory from config

Fixes: https://pagure.io/koji/issue/1022
This commit is contained in:
Tomas Kopecek 2018-08-01 15:55:15 +02:00 committed by Mike McLean
parent 7ca9d7829d
commit 27abb872c6

View file

@ -1737,11 +1737,13 @@ def read_config(profile_name, user_config=None):
}
for name in cert_defaults:
if result.get(name) is None:
fn = cert_defaults[name]
fn = os.path.expanduser(cert_defaults[name])
if os.path.exists(fn):
result[name] = fn
else:
result[name] = ''
else:
result[name] = os.path.expanduser(result[name])
return result