def _set_node_port(self): """Set the freakin' TCP port""" # If nodename is set, try to parse out a nodePort if self.nodeName is not None: nodeport_info = parse_node_port(self.nodeName) nodeName, nodePort = nodeport_info # If the nodeName differs, use it to replace the one we parsed if nodeName != self.nodeName: self.nodeName = nodeName # If the port isn't set, set it if nodePort is not None: self.nodePort = nodePort return None # Make sure the port is an integer if it's not None if self.nodePort is not None and isinstance(self.nodePort, basestring): self.nodePort = int(self.nodePort)