diff options
| author | historia <historiavg@proton.me> | 2026-08-26 17:46:48 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-08-26 17:46:48 -0400 |
| commit | 6ccb6d443d2fb871b43d96ea61a95bc3e6a92355 (patch) | |
| tree | d692ddccd6ec212cf4ebabb25a85e83af479d0fe /app/ui/hub.py | |
| parent | c147087c9d4707bffaeee58d390653637a21cce8 (diff) | |
| download | tts-audiobook-generator-6ccb6d443d2fb871b43d96ea61a95bc3e6a92355.tar.gz | |
feat: combined install/configure tui screens into one menu, removed extraneous wizard screens
Diffstat (limited to 'app/ui/hub.py')
| -rw-r--r-- | app/ui/hub.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/ui/hub.py b/app/ui/hub.py index 1c0cafa..b41b369 100644 --- a/app/ui/hub.py +++ b/app/ui/hub.py @@ -403,7 +403,10 @@ class _Hub: self.stdscr.timeout(-1) except Exception: pass - invalidate_detect_cache() + # The run may have autostarted a server or changed on-disk + # state; every exit path (stop-and-exit, key press, cancel, + # crash) must drop the cached statuses. + invalidate_detect_cache() return False # -- settings ------------------------------------------------------- @@ -1406,8 +1409,8 @@ def _read_port(values: dict, key: str) -> int: """Parse a port field value, raising ValueError on a bad number.""" try: number = int(values[key].strip()) - except (KeyError, ValueError): - raise ValueError(f"Enter a valid port for {key}") + except (KeyError, ValueError) as exc: + raise ValueError(f"Enter a valid port for {key}") from exc if not 1 <= number <= 65535: raise ValueError("Port must be between 1 and 65535") return number |
