mirror of
https://github.com/SL-RU/ranger_udisk_menu.git
synced 2025-01-12 15:26:42 +01:00
Merge pull request #3 from Syphdias/cull-children
Cull children since the script does not mount parents
This commit is contained in:
commit
77506abb8a
1 changed files with 6 additions and 0 deletions
6
menu.py
6
menu.py
|
@ -38,6 +38,12 @@ class ChoosePartition:
|
||||||
r = r.decode().replace('0B,', '\"0B\",')
|
r = r.decode().replace('0B,', '\"0B\",')
|
||||||
self.blkinfo = json.loads(r.encode())
|
self.blkinfo = json.loads(r.encode())
|
||||||
partn = 0
|
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']:
|
for bd in self.blkinfo['blockdevices']:
|
||||||
if 'children' not in bd:
|
if 'children' not in bd:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue