Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tools/terminal_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def read_password_thread():
break
chars.append(b)
result["password"] = b"".join(chars).decode("utf-8", errors="replace")
except (EOFError, KeyboardInterrupt, OSError):
except (EOFError, KeyboardInterrupt, OSError, ImportError, NotImplementedError):
result["password"] = ""
except Exception:
result["password"] = ""
Expand All @@ -218,12 +218,12 @@ def read_password_thread():
try:
import termios as _termios
_termios.tcsetattr(tty_fd, _termios.TCSAFLUSH, old_attrs)
except Exception:
except (Exception, ImportError, NotImplementedError):
pass
if tty_fd is not None:
try:
os.close(tty_fd)
except Exception:
except (Exception, ImportError, NotImplementedError):
pass
result["done"] = True

Expand Down