diff options
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 |
