Bundled KDE Connect: one safety net for every launch failure

Any unexpected error while launching clears the launch and reports it, so
the pad can always be started again; the temporary stderr file is made
inside the handled path and a failure reading it is tolerated.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
saphidandClaude Opus 5.5 committed 2026-09-28 22:01:09 +10:00
1 parent 98a5ec45bb
commit 41f08ac9a2
2 files changed
+32 -3

No files matched your search

+15
View File
@@ -379,6 +379,21 @@ class Bundled(unittest.TestCase):
agent.start()
self.wait_for(lambda: agent.status == {"state": "ready"})
def test_any_unexpected_error_still_reports_and_allows_a_retry(self):
agent, launches, procs = self.lifecycle([])
old = self.server.tempfile.TemporaryFile
self.server.tempfile.TemporaryFile = lambda: (_ for _ in ()).throw(OSError(24, "Too many open files"))
try:
agent.start()
self.wait_for(lambda: agent.status.get("state") == "error")
finally:
self.server.tempfile.TemporaryFile = old
self.assertIsNone(agent.launching)
agent.deliver = lambda report, force=False: (_ for _ in ()).throw(ValueError("something odd"))
agent.start()
self.wait_for(lambda: "something odd" in agent.status.get("message", ""))
self.assertIsNone(agent.launching)
def test_copies_go_to_a_folder_of_their_own(self):
first, _, _ = self.deliver(frame_has=False)
second, _, _ = self.deliver(frame_has=False)