Merge pull request #7 from Shinkirou/master

Fix JSON decode error.
This commit is contained in:
Alexander Lutsai 2022-06-20 00:10:48 +03:00 committed by GitHub
commit fdf2e4f847
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,8 @@ class ChoosePartition:
def _read_partitions(self):
r = subprocess.check_output(['lsblk', '--all', '--json', '-O'])
self.blkinfo = json.loads(r)
r = r.decode().replace('0B,', '\"0B\",')
self.blkinfo = json.loads(r.encode())
partn = 0
for bd in self.blkinfo['blockdevices']:
if 'children' not in bd: