Check for empty hostname

This commit is contained in:
Mike Place 2015-01-27 14:59:17 -07:00
parent 1a1fe2355f
commit a213563a9e

View File

@ -249,7 +249,10 @@ def _parse_hostname():
Parse /etc/hostname and return hostname
'''
contents = _read_file(_DEB_HOSTNAME_FILE)
if contents:
return contents[0].split('\n')[0]
else:
return ''
def _parse_current_network_settings():