Skip to content

Commit

Permalink
fix: also capture IOError/OSError/termios.error
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Jul 18, 2024
1 parent e3b1fcc commit 2f9a384
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion esptool/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import string
import struct
import sys
import termios
import time
from typing import Optional

Expand Down Expand Up @@ -336,7 +337,12 @@ def __init__(
# break the retrying line
print("")
break
except serial.serialutil.SerialException as e:
except (
serial.serialutil.SerialException,
IOError,
OSError,
termios.error,
) as e:
if retry_open_serial:
if not printed_failure:
print(e)
Expand Down

0 comments on commit 2f9a384

Please sign in to comment.