mirror of
https://github.com/openwrt-xiaomi/xmir-patcher.git
synced 2026-09-22 22:57:55 +03:00
Fix backup mtd partition by number
This commit is contained in:
+6
-2
@@ -30,8 +30,12 @@ if len(sys.argv) > 1:
|
||||
print(" ")
|
||||
a_part = input("Enter partition name or mtd number: ")
|
||||
if a_part != 'a':
|
||||
if isinstance(a_part, int):
|
||||
p = a_part
|
||||
try:
|
||||
i_part = int(a_part)
|
||||
except:
|
||||
i_part = None
|
||||
if i_part is not None:
|
||||
p = i_part
|
||||
if p < 0 or p >= len(dev.partlist):
|
||||
die('Partition "mtd{}" not found!'.format(a_part))
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user