From 0d985ab449ded1d91f6a04a457e0262892194d6d Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Sun, 19 Jul 2026 06:27:00 +0000 Subject: [PATCH] [FIX] script todo: list VMs before asking which IP to show The "Show a VM IP address" entry prompted for a VM name with no visible list, so the user had to guess the name/ID. It now runs virsh list --all first and asks for a "VM name or ID", making the expected input obvious. Co-Authored-By: Claude Opus 4.8 (1M context) --- script/todo/todo.py | 6 +++++- script/todo/todo_i18n.py | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/script/todo/todo.py b/script/todo/todo.py index e01df23..6fdd7e4 100755 --- a/script/todo/todo.py +++ b/script/todo/todo.py @@ -895,7 +895,11 @@ class TODO: self.execute.exec_command_live(cmd, source_erplibre=False) def _qemu_show_ip(self): - name = input(t("VM name: ")).strip() + # Affiche d'abord les VM (avec leur ID) pour que l'utilisateur sache + # quel nom/ID saisir, puis demande lequel. + self._qemu_list_vms() + print() + name = input(t("VM name or ID: ")).strip() if not name: print(t("VM name is required!")) return diff --git a/script/todo/todo_i18n.py b/script/todo/todo_i18n.py index 0391fcb..0de8d29 100644 --- a/script/todo/todo_i18n.py +++ b/script/todo/todo_i18n.py @@ -1041,6 +1041,10 @@ TRANSLATIONS = { "fr": "Nom de la VM : ", "en": "VM name: ", }, + "VM name or ID: ": { + "fr": "Nom ou ID de la VM : ", + "en": "VM name or ID: ", + }, "RAM in MB (blank = version minimum): ": { "fr": "RAM en Mo (vide = minimum de la version) : ", "en": "RAM in MB (blank = version minimum): ",