From 238b20da83ec22813a722c4a70ad845a1932ad72 Mon Sep 17 00:00:00 2001 From: Mathieu Comandon Date: Mon, 8 Jan 2024 01:19:50 -0800 Subject: [PATCH] Avoid crash if lsblk output can't be read --- lutris/util/linux.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lutris/util/linux.py b/lutris/util/linux.py index 6b52206e2..91217c603 100644 --- a/lutris/util/linux.py +++ b/lutris/util/linux.py @@ -164,6 +164,8 @@ class LinuxSystem: # pylint: disable=too-many-public-methods def get_drives(): """Return a list of drives with their filesystems""" lsblk_output = system.read_process_output(["lsblk", "-f", "--json"]) + if not lsblk_output: + return [] return [ drive for drive in json.loads(lsblk_output)["blockdevices"]