Skip to content

Commit bdb4f66

Browse files
committed
Fix AwaitComplete runtime error
1 parent dd0da34 commit bdb4f66

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

archinstall/tui/ui/components.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ def _set_cursor(self) -> None:
113113
def _exec_callback(self) -> None:
114114
assert self._data_callback
115115
result = self._data_callback()
116-
_ = self.dismiss(Result(ResultType.Selection, _data=result))
116+
# cannot call self.dismiss directly from
117+
# background thread (thread=true) as there's no event loop
118+
self.app.call_from_thread(self.dismiss, Result(ResultType.Selection, _data=result))
117119

118120
def action_pop_screen(self) -> None:
119121
_ = self.dismiss()

0 commit comments

Comments
 (0)