mirror of
https://github.com/saphid/frame-control.git
synced 2026-10-06 06:00:33 +02:00
Devices: fixes from review round 17
- A command that fails after a switch doesn't make the connector drop the new headset's connection. - On first import, the app keeps using the `frame` headset even when Set Up Connection put another block above it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
fa05a4b310
commit
90fd2684ba
5 files changed
+35
-3
No files matched your search
+2
-1
@@ -254,6 +254,7 @@ def ensure_master():
|
||||
|
||||
|
||||
def ssh(remote, *, stdin=None, timeout=30, text=True):
|
||||
route_gen = LINK.gen if LINK else None # which headset this command is for
|
||||
try:
|
||||
ensure_master()
|
||||
# Never let ssh inherit our stdin: under the app it's the pipe held open for
|
||||
@@ -266,7 +267,7 @@ def ssh(remote, *, stdin=None, timeout=30, text=True):
|
||||
if r.returncode != 0:
|
||||
err = (r.stderr or r.stdout) if text else (r.stderr or r.stdout).decode(errors="replace")
|
||||
if r.returncode == 255 and LINK and unreachable(err):
|
||||
LINK.lost(err) # ssh itself failed: the connector reconnects
|
||||
LINK.lost(err, route_gen) # ssh itself failed: the connector reconnects
|
||||
failure = Failure(strip_ansi(err).strip() or f"ssh exited {r.returncode}")
|
||||
failure.stdout = r.stdout if text else r.stdout.decode(errors="replace")
|
||||
raise failure
|
||||
|
||||
Reference in new issue
Block a user