コード例 #1
0
ファイル: sepolicy.py プロジェクト: mgrepl/selinux
    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)
コード例 #2
0
    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)