Safety precaution by using .get instead of ["..."]

This commit is contained in:
Anton Hvornum 2021-04-08 08:17:40 +02:00 committed by GitHub
parent f4233e73f0
commit cdf6fc796f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -341,7 +341,7 @@ def perform_installation(device, boot_partition, language, mirrors):
installation.enable_service('systemd-networkd')
installation.enable_service('systemd-resolved')
if archinstall.arguments['audio'] != 'none':
if archinstall.arguments.get('audio', None) != None:
installation.log(f"The {archinstall.arguments.get('audio', None)} audio server will be used.", level=archinstall.LOG_LEVELS.Info)
if archinstall.arguments.get('audio', None) == 'pipewire':
print('Installing pipewire ...')