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

Commit 6f9b69f

Browse files
committed
VirtualGraphics: Add graphics type pretty print helper
1 parent 4b53899 commit 6f9b69f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

virtinst/VirtualGraphics.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,15 @@ def valid_keymaps():
8181

8282
return sort_list
8383

84+
@staticmethod
85+
def pretty_type_simple(gtype):
86+
if (gtype in [VirtualGraphics.TYPE_VNC,
87+
VirtualGraphics.TYPE_SDL,
88+
VirtualGraphics.TYPE_RDP]):
89+
return str(gtype).upper()
90+
91+
return str(gtype).capitalize()
92+
8493
def __init__(self, type=TYPE_VNC, port=-1, listen=None, passwd=None,
8594
keymap=KEYMAP_DEFAULT, conn=None, parsexml=None,
8695
parsexmlnode=None, tlsPort=-1, channels=None,

0 commit comments

Comments
 (0)