Ejemplo n.º 1
0
 def input(self, args, key):
     self.dialog.wrong_input_message = _("Bad format of the IP address")
     try:
         field = self.visible_fields[int(key)-1]
     except (ValueError, IndexError):
         pass
     else:
         if field.attribute == "netmask":
             self.dialog.wrong_input_message = _("Bad format of the netmask")
     return EditTUISpoke.input(self, args, key)
Ejemplo n.º 2
0
 def input(self, args, key):
     self.dialog.wrong_input_message = _("Bad format of the IP address")
     try:
         field = self.visible_fields[int(key)-1]
     except (ValueError, IndexError):
         pass
     else:
         if field.attribute == "netmask":
             self.dialog.wrong_input_message = _("Bad format of the netmask")
     return EditTUISpoke.input(self, args, key)
Ejemplo n.º 3
0
    def input(self, args, key):
        self.dialog.wrong_input_message = None
        try:
            field = self.visible_fields[int(key)-1]
        except (ValueError, IndexError):
            pass
        else:
            if field.attribute == "gecos":
                self.dialog.wrong_input_message = _("Full name can't contain the ':' character")
            elif field.attribute == "name":
                # more granular message is returned by check_username
                pass
            elif field.attribute == "_groups":
                self.dialog.wrong_input_message = _("Either a group name in the group list is invalid or groups are not separated by a comma")


        return EditTUISpoke.input(self, args, key)
Ejemplo n.º 4
0
    def input(self, args, key):
        self.dialog.wrong_input_message = None
        try:
            field = self.visible_fields[int(key) - 1]
        except (ValueError, IndexError):
            pass
        else:
            if field.attribute == "gecos":
                self.dialog.wrong_input_message = _(
                    "Full name can't contain the ':' character")
            elif field.attribute == "name":
                # more granular message is returned by check_username
                pass
            elif field.attribute == "_groups":
                self.dialog.wrong_input_message = _(
                    "Either a group name in the group list is invalid or groups are not separated by a comma"
                )

        return EditTUISpoke.input(self, args, key)