File tree Expand file tree Collapse file tree 2 files changed +10
-16
lines changed Expand file tree Collapse file tree 2 files changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -296,15 +296,12 @@ def _check_if_can_reset(self):
296
296
strap_reg & self .GPIO_STRAP_SPI_BOOT_MASK == 0
297
297
and force_dl_reg & self .RTC_CNTL_FORCE_DOWNLOAD_BOOT_MASK == 0
298
298
):
299
- print (
300
- "WARNING: {} chip was placed into download mode using GPIO0.\n "
301
- "esptool.py can not exit the download mode over USB. "
302
- "To run the app, reset the chip manually.\n "
303
- "To suppress this note, set --after option to 'no_reset'." .format (
304
- self .get_chip_description ()
305
- )
299
+ raise SystemExit (
300
+ f"Error: { self .get_chip_description ()} chip was placed into download "
301
+ "mode using GPIO0.\n esptool.py can not exit the download mode over "
302
+ "USB. To run the app, reset the chip manually.\n "
303
+ "To suppress this note, set --after option to 'no_reset'."
306
304
)
307
- raise SystemExit (1 )
308
305
309
306
def hard_reset (self ):
310
307
uses_usb_otg = self .uses_usb_otg ()
Original file line number Diff line number Diff line change @@ -358,15 +358,12 @@ def _check_if_can_reset(self):
358
358
strap_reg & self .GPIO_STRAP_SPI_BOOT_MASK == 0
359
359
and force_dl_reg & self .RTC_CNTL_FORCE_DOWNLOAD_BOOT_MASK == 0
360
360
):
361
- print (
362
- "WARNING: {} chip was placed into download mode using GPIO0.\n "
363
- "esptool.py can not exit the download mode over USB. "
364
- "To run the app, reset the chip manually.\n "
365
- "To suppress this note, set --after option to 'no_reset'." .format (
366
- self .get_chip_description ()
367
- )
361
+ raise SystemExit (
362
+ f"Error: { self .get_chip_description ()} chip was placed into download "
363
+ "mode using GPIO0.\n esptool.py can not exit the download mode over "
364
+ "USB. To run the app, reset the chip manually.\n "
365
+ "To suppress this note, set --after option to 'no_reset'."
368
366
)
369
- raise SystemExit (1 )
370
367
371
368
def hard_reset (self ):
372
369
uses_usb_otg = self .uses_usb_otg ()
You can’t perform that action at this time.
0 commit comments