diff --git a/menu.py b/menu.py index 950bdf2..9713962 100644 --- a/menu.py +++ b/menu.py @@ -37,6 +37,12 @@ class ChoosePartition: r = subprocess.check_output(['lsblk', '--all', '--json', '-O']) self.blkinfo = json.loads(r) partn = 0 + # filter for devices with children, none other are used by this script + # (this is not entirely correct, but goes beyond these lines) + self.blkinfo['blockdevices'] = [ + bd + for bd in self.blkinfo['blockdevices'] + if 'children' in bd] for bd in self.blkinfo['blockdevices']: if 'children' not in bd: continue