From 849f6de9bd5761cdc5a64469671614c3c495bf92 Mon Sep 17 00:00:00 2001 From: Ahurac Date: Sun, 21 Jan 2024 23:41:32 +0100 Subject: [PATCH] launchers/kvm : chargement maxi-paresseux --- qemu/launchers/kvm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu/launchers/kvm b/qemu/launchers/kvm index 141a008..82ef336 100755 --- a/qemu/launchers/kvm +++ b/qemu/launchers/kvm @@ -1,17 +1,17 @@ #!/usr/bin/env python3 # Retrieve the name of the monitor socket -from subprocess import check_output from subprocess import CalledProcessError try: + from subprocess import check_output socket = 'unix:%s,server,nowait' % (check_output(["sockpath"], text=True)) except CalledProcessError as e: exit(e.returncode) # Set number of vCPUs to use to the environment variable QEMUSH_NPROC or # half of total vCPUs installed if it fails -from os import environ try: + from os import environ nproc = environ['QEMUSH_NPROC'] except KeyError: from multiprocessing import cpu_count