def _error_msg_iface(iface, option, expected):
 msg = 'Invalid option -- Interface: {0}, Option: {1}, Expected: [{2}]'
 return msg.format(iface, option, '|'.join(expected))

def _error_msg_iface ( iface , option , expected ) : msg = 'Invalid option -- Interface: {0}, Option: {1}, Expected: [{2}]' return msg . format ( iface , option , '|' . join ( expected ) )
build an appropriate error message from a given option and a list of expected values .