Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 0b0e707

Browse files
committed
VirtualWatchdog: Better handle unexpected action type
1 parent 838cee7 commit 0b0e707

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

virtinst/VirtualWatchdog.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ def get_action_desc(action):
4949
return _("Pause the guest")
5050
if action == VirtualWatchdog.ACTION_NONE:
5151
return _("No action")
52-
53-
raise ValueError("Unknown watchdog action '%s'." % action)
52+
if action == VirtualWatchdog.ACTION_DEFAULT:
53+
return _("Hypervisor default")
54+
else:
55+
return action
5456

5557
def __init__(self, conn):
5658
VirtualDevice.VirtualDevice.__init__(self, conn)

0 commit comments

Comments
 (0)