From 5bfcdefe8c63bf9ed0a266569d9b4141badab673 Mon Sep 17 00:00:00 2001 From: "Hugh O. Brock" Date: Tue, 1 May 2007 17:55:44 -0400 Subject: [PATCH] Make NIC numbering in the details pane show something useful (in this case, the tail end of the MAC address) --- src/virtManager/details.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/virtManager/details.py b/src/virtManager/details.py index fbd6f5d6..6d23e136 100644 --- a/src/virtManager/details.py +++ b/src/virtManager/details.py @@ -528,6 +528,7 @@ class vmmDetails(gobject.GObject): # Populate list of NICs currentNICs = {} + nic_number = 0 for nic in self.vm.get_network_devices(): missing = True insertAt = 0 @@ -544,7 +545,7 @@ class vmmDetails(gobject.GObject): # Add in row if missing: - hw_list_model.insert(insertAt, ["NIC #%d" % len(currentNICs), self.pixbuf_nic, VMM_HW_NIC, nic]) + hw_list_model.insert(insertAt, ["NIC %s" % nic[3][-3:], self.pixbuf_nic, VMM_HW_NIC, nic]) # Now remove any no longer current devs devs = range(len(hw_list_model))