def __call__(self, parser, namespace, values, option_string=None): from sepolicy.interface import get_interface_dict interface_dict = get_interface_dict() for v in values: if v not in list(interface_dict.keys()): raise ValueError(_("Interface %s does not exist.") % v) setattr(namespace, self.dest, values)
def __call__(self, parser, namespace, values, option_string=None): from sepolicy.interface import get_interface_dict interface_dict = get_interface_dict() for v in values: if v not in interface_dict.keys(): raise ValueError(_("Interface %s does not exist.") % v) setattr(namespace, self.dest, values)