Merge comparisons with 'in'

This commit is contained in:
Jochen Sprickerhof 2022-09-05 17:14:51 +02:00
parent f4739ef3c0
commit cf0100cf11
No known key found for this signature in database
GPG key ID: 5BFFDCC258E69433
6 changed files with 19 additions and 17 deletions

View file

@ -616,7 +616,7 @@ if __name__ == '__main__':
virt = subprocess.check_output('/usr/bin/systemd-detect-virt').strip().decode('utf-8')
except subprocess.CalledProcessError:
virt = 'none'
if virt == 'qemu' or virt == 'kvm' or virt == 'bochs':
if virt in ('qemu', 'kvm', 'bochs'):
logging.info('Running in a VM guest, defaulting to QEMU/KVM via libvirt')
config['vm_provider'] = 'libvirt'
elif virt != 'none':