From eedb06f0edac71b172345630114c831a73419b90 Mon Sep 17 00:00:00 2001 From: Abhilash Raj Date: Mon, 31 May 2021 21:53:54 -0700 Subject: [PATCH] Fix set the title of the thread. --- qweechat/buffer.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qweechat/buffer.py b/qweechat/buffer.py index 2ccd6e7..88e403e 100644 --- a/qweechat/buffer.py +++ b/qweechat/buffer.py @@ -19,6 +19,7 @@ # You should have received a copy of the GNU General Public License # along with QWeeChat. If not, see . # +import traceback from pkg_resources import resource_filename from qweechat.chat import ChatTextEdit @@ -167,15 +168,17 @@ class Buffer(QtCore.QObject): """Update title.""" try: self.widget.set_title( - color.remove(self.data['title'].decode('utf-8'))) - except: # noqa: E722 + color.remove(self.data['title'])) + except Exception as e: # noqa: E722 + # TODO: Debug print the exception to be fixed. + # traceback.print_exc() self.widget.set_title(None) def update_prompt(self): """Update prompt.""" try: self.widget.set_prompt(self.data['local_variables']['nick']) - except: # noqa: E722 + except Exception as e: # noqa: E722 self.widget.set_prompt(None) def input_text_sent(self, text):