MCPcopy Create free account
hub / github.com/BuddySirJava/SSH-Studio / _parse_config_async

Method _parse_config_async

src/main.py:178–208  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

176 GLib.idle_add(self._parse_config_async)
177
178 def _parse_config_async(self):
179 def worker():
180 try:
181 if self.parser is not None:
182 self.parser.parse()
183
184 def update_ui():
185 try:
186 if self.main_window and getattr(
187 self.main_window, "host_list", None
188 ):
189 self.main_window.host_list.load_hosts(
190 self.parser.config.hosts
191 )
192 except Exception:
193 pass
194 return False
195
196 GLib.idle_add(update_ui)
197 except Exception as e:
198 logging.error(f"Failed to initialize SSH config parser: {e}")
199 GLib.idle_add(
200 lambda: (
201 self._show_error_dialog(_("Failed to load SSH config"), str(e)),
202 False,
203 )[1]
204 )
205
206 t = threading.Thread(target=worker, daemon=True)
207 t.start()
208 return False
209
210 def _add_actions(self):
211 search_action = Gio.SimpleAction.new("search", None)

Callers 2

__init__Method · 0.80
_load_configMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected