1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-07-28 15:41:52 +03:00

examples: Replace sys.exit() with exit()

No need to import sys.

Signed-off-by: Philipp Hahn <hahn@univention.de>
This commit is contained in:
Philipp Hahn
2020-07-28 07:15:55 +02:00
committed by Philipp Hahn
parent f496dc55ee
commit b801ff31fa
10 changed files with 18 additions and 28 deletions

View File

@ -5,7 +5,6 @@ DIR must exist and be writable by this process.
"""
import libvirt
import sys
import os
from argparse import ArgumentParser
@ -18,7 +17,7 @@ try:
conn = libvirt.open(None)
except libvirt.libvirtError:
print('Failed to open connection to the hypervisor')
sys.exit(1)
exit(1)
doms = conn.listDomainsID()
for id in doms: