mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +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
|
Parse /etc/hostname and return hostname
|
||||||
'''
|
'''
|
||||||
contents = _read_file(_DEB_HOSTNAME_FILE)
|
contents = _read_file(_DEB_HOSTNAME_FILE)
|
||||||
|
if contents:
|
||||||
return contents[0].split('\n')[0]
|
return contents[0].split('\n')[0]
|
||||||
|
else:
|
||||||
|
return ''
|
||||||
|
|
||||||
|
|
||||||
def _parse_current_network_settings():
|
def _parse_current_network_settings():
|
||||||
|
Loading…
Reference in New Issue
Block a user