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:
committed by
Philipp Hahn
parent
f496dc55ee
commit
b801ff31fa
@ -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:
|
||||
|
Reference in New Issue
Block a user