]> jfr.im git - irc/weechat/qweechat.git/commitdiff
Fix set the title of the thread.
authorAbhilash Raj <redacted>
Tue, 1 Jun 2021 04:53:54 +0000 (21:53 -0700)
committerAbhilash Raj <redacted>
Tue, 1 Jun 2021 04:53:54 +0000 (21:53 -0700)
qweechat/buffer.py

index 2ccd6e707065e6ef1969eecfd4ec235f10508898..88e403ea896d315ecc0349f40647c7fdde4ec66d 100644 (file)
@@ -19,6 +19,7 @@
 # You should have received a copy of the GNU General Public License
 # along with QWeeChat.  If not, see <http://www.gnu.org/licenses/>.
 #
+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):