mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Use expanduser instead of HOME env var
The HOME directory may not be available in containers. It's also the wrong variable on some platforms. Use os.path.expanduser() instead of HOME. Fixes: https://pagure.io/freeipa/issue/7837 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
@@ -225,7 +225,7 @@ DEFAULT_CONFIG = (
|
||||
('site_packages', object), # The directory contaning ipalib
|
||||
('script', object), # sys.argv[0]
|
||||
('bin', object), # The directory containing the script
|
||||
('home', object), # $HOME
|
||||
('home', object), # os.path.expanduser('~')
|
||||
|
||||
# Vars set in Env._bootstrap():
|
||||
('in_tree', object), # Whether or not running in-tree (bool)
|
||||
@@ -313,13 +313,7 @@ TLS_VERSION_MINIMAL = "tls1.0"
|
||||
# Use cache path
|
||||
USER_CACHE_PATH = (
|
||||
os.environ.get('XDG_CACHE_HOME') or
|
||||
os.path.join(
|
||||
os.environ.get(
|
||||
'HOME',
|
||||
os.path.expanduser('~')
|
||||
),
|
||||
'.cache'
|
||||
)
|
||||
os.path.expanduser('~/.cache')
|
||||
)
|
||||
|
||||
SOFTHSM_DNSSEC_TOKEN_LABEL = u'ipaDNSSEC'
|
||||
|
||||
Reference in New Issue
Block a user