createnet: use vmmInterface.get_name() instead of vmmInterface.name

It fixes this exception:

Traceback (most recent call last):
  File "virt-manager/virtManager/host.py", line 467, in add_network
    self.addnet.show(self.topwin)
  File "virt-manager/virtManager/createnet.py", line 102, in show
    self.reset_state()
  File "virt-manager/virtManager/createnet.py", line 180, in reset_state
    devnames.append(iface.name)
AttributeError: 'vmmInterface' object has no attribute 'name'

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2014-06-24 09:44:04 +02:00
parent c78974c0d9
commit 48be09a997
1 changed files with 2 additions and 2 deletions

View File

@ -174,8 +174,8 @@ class vmmCreateNetwork(vmmGObjectUI):
for nodedev in self.conn.get_nodedevs("net"):
devnames.append(nodedev.name)
for iface in self.conn.list_interfaces():
if iface.name not in devnames:
devnames.append(iface.name)
if iface.get_name() not in devnames:
devnames.append(iface.get_name())
for name in devnames:
fw_model.append([_("Physical device %s") % name, name])