diff --git a/bot_bottle/backend/smolmachines/pty_resize.py b/bot_bottle/backend/smolmachines/pty_resize.py index cae1664..e4cbb00 100644 --- a/bot_bottle/backend/smolmachines/pty_resize.py +++ b/bot_bottle/backend/smolmachines/pty_resize.py @@ -68,8 +68,9 @@ def _read_winsize() -> tuple[int, int] | None: - tmux respawn-pane: tmux sets all three to the pane's PTY. - non-TTY (someone piped stdin in tests): none are; the sync just no-ops, which is the right behavior.""" - for fd in (sys.stdin.fileno(), sys.stdout.fileno(), sys.stderr.fileno()): + for stream in (sys.stdin, sys.stdout, sys.stderr): try: + fd = stream.fileno() data = fcntl.ioctl(fd, termios.TIOCGWINSZ, b"\x00" * 8) except OSError: continue diff --git a/bot_bottle/contrib/codex/codex_auth.py b/bot_bottle/contrib/codex/codex_auth.py index 9f6da0a..d38ecb6 100644 --- a/bot_bottle/contrib/codex/codex_auth.py +++ b/bot_bottle/contrib/codex/codex_auth.py @@ -15,8 +15,8 @@ from datetime import datetime, timezone from pathlib import Path from typing import cast -from .log import die -from .util import expand_tilde +from ...log import die +from ...util import expand_tilde def codex_auth_path(host_env: dict[str, str] | None = None) -> Path: