fix: Expected arrow in ls output

This will fix the partition table output handing on some firmwares.
Origin post:
https://forum.xda-developers.com/showpost.php?p=74072785&postcount=54
This commit is contained in:
steadfasterX 2017-10-27 09:45:04 +02:00
parent 8dc96c2178
commit 2117454ea6

View file

@ -37,6 +37,8 @@ def get_partitions(comm):
output = output.strip().decode('ascii')
names = []
for line in output.strip().split("\n"):
if(line.split()[0] == 'total'):
continue
label, arrow, path = line.split()[-3:]
assert arrow == '->', "Expected arrow in ls output"
blockdev = path.split('/')[-1]