[virt-tools-list] [PATCH virt-manager] createnet: use vmmInterface.get_name() instead of vmmInterface.name

Giuseppe Scrivano gscrivan at redhat.com
Tue Jun 24 15:18:25 UTC 2014


Cole Robinson <crobinso at redhat.com> writes:

> On 06/24/2014 08:03 AM, Giuseppe Scrivano wrote:
>> 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 at redhat.com>
>> ---
>>  virtManager/createnet.py | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/virtManager/createnet.py b/virtManager/createnet.py
>> index 60dcb1a..96b94fb 100644
>> --- a/virtManager/createnet.py
>> +++ b/virtManager/createnet.py
>> @@ -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])
>> 
>
> Whoops, sorry. ACK

pushed now.

Regards,
Giuseppe




More information about the virt-tools-list mailing list