def ensure_unicode_args(function):
    '''
    Decodes all arguments passed to the wrapped function
    '''
    @wraps(function)
    def wrapped(*args, **kwargs):
        if six.PY2:
            return function(
                *salt.utils.data.decode_list(args),
                **salt.utils.data.decode_dict(kwargs)
            )
        else:
            return function(*args, **kwargs)
    return wrapped
def ensure_unicode_args ( function ) : @ wraps ( function ) def wrapped ( * args , ** kwargs ) : if six . PY2 : return function ( * salt . utils . data . decode_list ( args ) , ** salt . utils . data . decode_dict ( kwargs ) ) else : return function ( * args , ** kwargs ) return wrapped
Decodes all arguments passed to the wrapped function