[read_info] Fix search partition by name

This commit is contained in:
remittor
2023-10-17 11:36:10 +03:00
parent a6821fa262
commit b721ff7daf
2 changed files with 16 additions and 9 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ if len(sys.argv) > 1:
if p < 0 or p >= len(dev.partlist):
die('Partition "mtd{}" not found!'.format(a_part))
else:
p = dev.get_part_num(a_part, comptype = 'ends')
p = dev.get_part_num(a_part)
if p < 0:
die('Partition "{}" not found!'.format(a_part))
name = dev.partlist[p]['name']