diff options
author | Philipp Hahn <hahn@univention.de> | 2020-07-28 07:15:55 +0200 |
---|---|---|
committer | Philipp Hahn <pmhahn+github@pmhahn.de> | 2020-08-05 07:43:02 +0000 |
commit | b801ff31faf97a616e554ba266783d480e00b781 (patch) | |
tree | ff56f75ee3368b2f9edc36a5dc002295d38ece8a /examples/nodestats.py | |
parent | f496dc55ee0c4ec248e27fd78f04edc51e75a92f (diff) | |
download | libvirt-python-b801ff31faf97a616e554ba266783d480e00b781.tar.gz |
examples: Replace sys.exit() with exit()
No need to import sys.
Signed-off-by: Philipp Hahn <hahn@univention.de>
Diffstat (limited to 'examples/nodestats.py')
-rwxr-xr-x | examples/nodestats.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/nodestats.py b/examples/nodestats.py index 88ca462..10520b2 100755 --- a/examples/nodestats.py +++ b/examples/nodestats.py @@ -5,7 +5,6 @@ # Michal Privoznik <mprivozn@redhat.com> import libvirt -import sys from xml.dom import minidom import libxml2 from typing import Any, Dict # noqa F401 @@ -22,13 +21,13 @@ try: conn = libvirt.openReadOnly(None) except libvirt.libvirtError: print("Failed to connect to the hypervisor") - sys.exit(1) + exit(1) try: capsXML = conn.getCapabilities() except libvirt.libvirtError: print("Failed to request capabilities") - sys.exit(1) + exit(1) caps = minidom.parseString(capsXML) cells = caps.getElementsByTagName("cells")[0] |