# Buggy code
def interfaces():
    """
    Return a dictionary of information about all the interfaces on the minion
    """
    if salt.utils.platform.is_windows():
        return win_interfaces()
    else:
        return linux_interfaces()


# Traceback (ValueError)
# salt-master
[ERROR   ] '127.0.0.1/8' does not appear to be an IPv4 or IPv6 address
Traceback (most recent call last):
File "/usr/pkg/lib/python2.7/site-packages/salt/utils/parsers.py", line 210, in parse_args
process_option_func()
File "/usr/pkg/lib/python2.7/site-packages/salt/utils/parsers.py", line 548, in process_config_dir
self.config.update(self.setup_config())
File "/usr/pkg/lib/python2.7/site-packages/salt/utils/parsers.py", line 1770, in setup_config
return config.master_config(self.get_config_file_path())
File "/usr/pkg/lib/python2.7/site-packages/salt/config/__init__.py", line 3854, in master_config
opts = apply_master_config(overrides, defaults)
File "/usr/pkg/lib/python2.7/site-packages/salt/config/__init__.py", line 3950, in apply_master_config
cache_minion_id=None)
File "/usr/pkg/lib/python2.7/site-packages/salt/config/__init__.py", line 3608, in get_id
newid = salt.utils.network.generate_minion_id()
File "/usr/pkg/lib/python2.7/site-packages/salt/utils/network.py", line 172, in generate_minion_id
ret = salt.utils.stringutils.to_unicode(_generate_minion_id().first())
File "/usr/pkg/lib/python2.7/site-packages/salt/utils/network.py", line 161, in _generate_minion_id
return hosts.extend([addr for addr in ip_addrs()
File "/usr/pkg/lib/python2.7/site-packages/salt/utils/network.py", line 1202, in ip_addrs
return _ip_addrs(interface, include_loopback, interface_data, 'inet')
File "/usr/pkg/lib/python2.7/site-packages/salt/utils/network.py", line 1190, in _ip_addrs
addr = ipaddress.ip_address(addr.get('address'))
File "/usr/pkg/lib/python2.7/site-packages/salt/ext/ipaddress.py", line 120, in ip_address
address)
ValueError: '127.0.0.1/8' does not appear to be an IPv4 or IPv6 address
Usage: salt-master [options]

salt-master: error: Error while processing <bound method Master.process_config_dir of <salt.cli.daemons.Master object at 0x7f19ce047d50>>: Traceback (most recent call last):
File "/usr/pkg/lib/python2.7/site-packages/salt/utils/parsers.py", line 210, in parse_args
process_option_func()
File "/usr/pkg/lib/python2.7/site-packages/salt/utils/parsers.py", line 548, in process_config_dir
self.config.update(self.setup_config())
File "/usr/pkg/lib/python2.7/site-packages/salt/utils/parsers.py", line 1770, in setup_config
return config.master_config(self.get_config_file_path())
File "/usr/pkg/lib/python2.7/site-packages/salt/config/__init__.py", line 3854, in master_config
opts = apply_master_config(overrides, defaults)
File "/usr/pkg/lib/python2.7/site-packages/salt/config/__init__.py", line 3950, in apply_master_config
cache_minion_id=None)
File "/usr/pkg/lib/python2.7/site-packages/salt/config/__init__.py", line 3608, in get_id
newid = salt.utils.network.generate_minion_id()
File "/usr/pkg/lib/python2.7/site-packages/salt/utils/network.py", line 172, in generate_minion_id
ret = salt.utils.stringutils.to_unicode(_generate_minion_id().first())
File "/usr/pkg/lib/python2.7/site-packages/salt/utils/network.py", line 161, in _generate_minion_id
return hosts.extend([addr for addr in ip_addrs()
File "/usr/pkg/lib/python2.7/site-packages/salt/utils/network.py", line 1202, in ip_addrs
return _ip_addrs(interface, include_loopback, interface_data, 'inet')
File "/usr/pkg/lib/python2.7/site-packages/salt/utils/network.py", line 1190, in _ip_addrs
addr = ipaddress.ip_address(addr.get('address'))
File "/usr/pkg/lib/python2.7/site-packages/salt/ext/ipaddress.py", line 120, in ip_address
address)
ValueError: '127.0.0.1/8' does not appear to be an IPv4 or IPv6 address

# Fixed code
def interfaces():
    """
    Return a dictionary of information about all the interfaces on the minion
    """
    if salt.utils.platform.is_windows():
        return win_interfaces()
    elif salt.utils.platform.is_netbsd():
        return netbsd_interfaces()
    else:
        return linux_interfaces()