PR#1023: Expand user directory from config
Merges #1023 https://pagure.io/koji/pull-request/1023 Fixes: #1022 https://pagure.io/koji/issue/1022 home directories in config paths are not expanded
This commit is contained in:
commit
96a964ddbe
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue