stm32_mem: Fix native crashing in dfu-detach when repeatedly flashed.

This commit is contained in:
Uwe Bonnes 2019-09-27 12:31:08 +02:00
parent afbde05cd3
commit fc3abf26ef
1 changed files with 4 additions and 1 deletions

View File

@ -174,7 +174,10 @@ if __name__ == "__main__":
print("Failed to read device state! Assuming APP_IDLE")
state = dfu.STATE_APP_IDLE
if state == dfu.STATE_APP_IDLE:
dfudev.detach()
try:
dfudev.detach()
except:
pass
dfudev.release()
print("Invoking DFU Device")
timeout = 0