'Get a random port which is not already selected.'

def _get_random_port(self, path):

    if (path not in self.selected_ports):
        self.selected_ports[path] = get_random_port()
        self._logger.debug(u'Get    random    port    %d    for    [%s]', self.selected_ports[path], path)
    return self.selected_ports[path]
