1
0
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:
Philipp Hahn
2020-04-27 11:10:13 +02:00
committed by Philipp Hahn
parent 5434ed53ff
commit 9cf539a2a8
11 changed files with 129 additions and 120 deletions

View File

@ -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")