From b801ff31faf97a616e554ba266783d480e00b781 Mon Sep 17 00:00:00 2001 From: Philipp Hahn Date: Tue, 28 Jul 2020 07:15:55 +0200 Subject: examples: Replace sys.exit() with exit() No need to import sys. Signed-off-by: Philipp Hahn --- examples/nodestats.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'examples/nodestats.py') 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 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] -- cgit v1.2.1