def handle_argv(self):
        if len(self.argv) == 1:
            self.ui.help()
        else:
            arg1 = self.argv[1]

            if arg1 == '--completion':
                self.ui.valid_targets(self.targets)
            elif arg1 in self.targets:
                ips = sorted(self.targets[arg1])
                selected_ip = random.choice(ips)
                self.ui.connect_to(selected_ip, ips, arg1)
            else:
                self.ui.invalid_target(arg1)
dataset/ETHPy150Open grahamc/ish/ish/ui.py/InputHandler.handle_argv/original