mirror of
https://github.com/lutris/lutris
synced 2024-10-14 19:53:53 +00:00
Avoid crash if lsblk output can't be read
This commit is contained in:
parent
73863761e0
commit
238b20da83
|
@ -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"]
|
||||
|
|
Loading…
Reference in a new issue