Skip to content

Commit 7d6f70d

Browse files
committed
fix #14 by lowercase-ing partition names from /sys
1 parent 1a67c0a commit 7d6f70d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tetherback/tetherback.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ def uevent_dict(path):
164164
for ii in range(1, nparts+1):
165165
d = uevent_dict('/sys/block/mmcblk0/mmcblk0p%d/uevent'%ii)
166166
size = int(sp.check_output(adbcmd+('shell','cat /sys/block/mmcblk0/mmcblk0p%d/size'%ii)))
167-
partmap.append((d['PARTNAME'], d['DEVNAME'], int(d['PARTN']), size))
167+
# some devices have uppercase names, see #14
168+
partmap.append((d['PARTNAME'].lower(), d['DEVNAME'], int(d['PARTN']), size))
168169
pbar.update(ii)
169170
else:
170171
pbar.finish()

0 commit comments

Comments
 (0)