mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
fix code conventions for pylint
This commit is contained in:
parent
d283e0e1b3
commit
22cb8f702a
16 changed files with 245 additions and 110 deletions
|
|
@ -1,7 +1,8 @@
|
|||
from vrtManager.connection import wvmConnect
|
||||
from vrtManager import util
|
||||
from xml.etree import ElementTree
|
||||
from libvirt import VIR_INTERFACE_XML_INACTIVE
|
||||
from vrtManager.connection import wvmConnect
|
||||
from vrtManager import util
|
||||
|
||||
|
||||
|
||||
class wvmInterfaces(wvmConnect):
|
||||
|
|
@ -138,7 +139,7 @@ class wvmInterface(wvmConnect):
|
|||
for iface in tree.findall("./bridge/"):
|
||||
address = state = speed = None
|
||||
name = iface.get('name')
|
||||
type = iface.get('type')
|
||||
if_type = iface.get('type')
|
||||
link = iface.find('link')
|
||||
if link is not None:
|
||||
state = link.get('state')
|
||||
|
|
@ -146,7 +147,7 @@ class wvmInterface(wvmConnect):
|
|||
mac = iface.find('mac')
|
||||
if mac is not None:
|
||||
address = mac.get('address')
|
||||
ifaces.append({'name': name, 'type': type, 'state': state, 'speed': speed, 'mac': address})
|
||||
ifaces.append({'name': name, 'type': if_type, 'state': state, 'speed': speed, 'mac': address})
|
||||
return ifaces
|
||||
else:
|
||||
return None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue