mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-08-01 00:21:59 +03:00
examples: Add/fix PEP 484 type annotation
Signed-off-by: Philipp Hahn <hahn@univention.de>
This commit is contained in:
committed by
Philipp Hahn
parent
5434ed53ff
commit
9cf539a2a8
@ -10,7 +10,7 @@ IPTYPE = {
|
||||
}
|
||||
|
||||
|
||||
def print_dom_ifaces(dom):
|
||||
def print_dom_ifaces(dom: libvirt.virDomain) -> None:
|
||||
ifaces = dom.interfaceAddresses(libvirt.VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASE)
|
||||
if ifaces is None:
|
||||
print("Failed to get domain interfaces")
|
||||
|
Reference in New Issue
Block a user