def __call__(self, parser, namespace, value, option_string=None): newval = getattr(namespace, self.dest) if not newval: newval = [] users = sepolicy.get_all_users() if value not in users: raise ValueError("%s must be an SELinux user:\nValid users: %s" % (value, ", ".join(users))) newval.append(value) setattr(namespace, self.dest, newval)
def __call__(self, parser, namespace, value, option_string=None): newval = getattr(namespace, self.dest) if not newval: newval = [] users = sepolicy.get_all_users() if value not in users: raise ValueError("%s must be an SELinux user:\nValid users: %s" % (value, ", ".join(users))) newval.append(value) setattr(namespace, self.dest, newval)