home · contact · privacy
Remove dead code.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 23 Sep 2025 14:34:32 +0000 (16:34 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 23 Sep 2025 14:34:32 +0000 (16:34 +0200)
ircplom/client_tui.py

index 27e171e79556a5eec860ff7087b629c5dc181729..b9f00ae9b68ec25370a603635fd24a8123e2d99d 100644 (file)
@@ -522,20 +522,16 @@ class ClientKnowingTui(Client):
         try:
             super().handle_msg(msg)
         except ImplementationFail as e:
-            self._log(str(e), scope=LogScope.DEBUG, alert=True)
+            self._log(str(e), alert=True)
 
     def _log(self, msg: str, scope: Optional[LogScope] = None, **kwargs
              ) -> None:
-        to_log = []
-        if msg:
-            to_log += [msg]
         if not scope:
             scope = LogScope.DEBUG
-        for item in to_log:
-            self._client_tui_trigger('log', scope=scope, msg=item, **kwargs)
-            if scope == LogScope.RAW:
-                with open(f'{self.client_id}.log', 'a', encoding='utf8') as f:
-                    f.write(('>' if kwargs['out'] else '<') + f' {msg}\n')
+        self._client_tui_trigger('log', scope=scope, msg=msg, **kwargs)
+        if scope == LogScope.RAW:
+            with open(f'{self.client_id}.log', 'a', encoding='utf8') as f:
+                f.write(('>' if kwargs['out'] else '<') + f' {msg}\n')
 
     def _on_update(self, *path) -> None:
         for path, value in self.db.into_endnode_updates(path):