Fix a case when HOME is set but empty
This commit is contained in:
parent
44673131fc
commit
2b5f1a0148
2 changed files with 8 additions and 2 deletions
|
@ -175,6 +175,11 @@ def str_hash(s):
|
|||
|
||||
def home_dir():
|
||||
if 'HOME' in os.environ:
|
||||
return os.path.join(os.environ['HOME'], ".cdist")
|
||||
home = os.environ['HOME']
|
||||
if home:
|
||||
rv = os.path.join(home, ".cdist")
|
||||
else:
|
||||
return None
|
||||
rv = None
|
||||
else:
|
||||
rv = None
|
||||
return rv
|
||||
|
|
|
@ -6,6 +6,7 @@ next:
|
|||
* Core: Add -4 and -6 params to force IPv4, IPv6 addresses respectively (Darko Poljak)
|
||||
* Type __package_update_index: Fix messaging (Thomas Eckert)
|
||||
* Type __package_dpkg: Add state parameter and messaging (Thomas Eckert)
|
||||
* Core: Fix a case when HOME is set but empty (Darko Poljak)
|
||||
|
||||
4.8.0: 2018-02-14
|
||||
* Core: Skip empty lines in parameter files (Darko Poljak)
|
||||
|
|
Loading…
Reference in a new issue