missed a .format and messed up the join

This commit is contained in:
Jorge Schrauwen 2016-02-19 22:57:58 +00:00
parent bbd2fdc96d
commit bdf2576dfb

View file

@ -521,8 +521,8 @@ def _interfaces_ifconfig(out):
if salt.utils.is_sunos():
expand_mac = []
for chunk in data['hwaddr'].split(':'):
expand_mac.append('0{0}' if len(chunk) < 2 else '{0}'.format(chunk))
data['hwaddr'] = expand_mac.join(':')
expand_mac.append('0{0}'.format(chunk) if len(chunk) < 2 else '{0}'.format(chunk))
data['hwaddr'] = ':'.join(expand_mac)
if mip:
if 'inet' not in data:
data['inet'] = list()