def update_ports(self):
ports = set()<EOL>for port in self.configured_ports:<EOL><INDENT>try:<EOL><INDENT>ports.add(int(port))<EOL><DEDENT>except ValueError:<EOL><INDENT>logger.error("<STR_LIT>", port)<EOL>continue<EOL><DEDENT><DEDENT>self.ports = ports<EOL>
Sets the `ports` attribute to the set of valid port values set in
the configuration.