mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Check for empty hostname
This commit is contained in:
parent
1a1fe2355f
commit
a213563a9e
@ -249,7 +249,10 @@ def _parse_hostname():
|
||||
Parse /etc/hostname and return hostname
|
||||
'''
|
||||
contents = _read_file(_DEB_HOSTNAME_FILE)
|
||||
return contents[0].split('\n')[0]
|
||||
if contents:
|
||||
return contents[0].split('\n')[0]
|
||||
else:
|
||||
return ''
|
||||
|
||||
|
||||
def _parse_current_network_settings():
|
||||
|
Loading…
Reference in New Issue
Block a user