File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -1173,13 +1173,23 @@ def compile(*args): # NOQA
11731173 sys .exit (ret_code )
11741174
11751175 if not skip_partition_resize and partition_size == - 1 :
1176- if 'Error: app partition is too small' in output :
1176+
1177+ for pattern in (
1178+ 'Error: app partition is too small' ,
1179+ 'Error: All app partitions are too small'
1180+ ):
1181+ if pattern in output :
1182+ break
1183+ else :
1184+ pattern = None
1185+
1186+ if pattern is not None :
11771187 sys .stdout .write (
11781188 '\n \033 [31;1m***** Resizing Partition *****\033 [0m\n '
11791189 )
11801190 sys .stdout .flush ()
11811191
1182- app_size = output .rsplit ('Error: app partition is too small' , 1 )[1 ]
1192+ app_size = output .rsplit (pattern , 1 )[1 ]
11831193 app_size = app_size .split ('micropython.bin size' , 1 )[1 ]
11841194 app_size = int (app_size .split (':' , 1 )[0 ].strip (), 16 )
11851195
You can’t perform that action at this time.
0 commit comments