saltstack/salt — pull request #11986 by jleroy (2014-04-14 20:07:42+00:00)
Title: Fix error when /etc/hostname contains a short hostname on Debian

This pull request fix an error which occurs when /etc/hostname contains a short hostname (no domain name) on Debian.

```
$ cat /etc/hostname
salt-master
```

Error returned:

```
ID: hostname
Function: network.system
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1371, in call
**cdata['kwargs'])
File "/usr/lib/python2.7/dist-packages/salt/states/network.py", line 380, in system
new = __salt__['ip.build_network_settings'](**kwargs)
File "/usr/lib/python2.7/dist-packages/salt/modules/debian_ip.py", line 1487, in build_network_settings
domainname = sline[1]
IndexError: list index out of range
Changes:
```

I didn't find where to add tests for network module.