summaryrefslogtreecommitdiff
path: root/src/room.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-09-03 18:01:43 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-09-03 18:01:43 +0000
commit17eb99eea718191b619277754bf15e6a7554d916 (patch)
treeaa39d3583025b4a49f7492245981cd519c6855e9 /src/room.py
parent43654505fb2efa3994081e68613e5bd8dd033660 (diff)
downloadpoezio-17eb99eea718191b619277754bf15e6a7554d916.tar.gz
poezio-17eb99eea718191b619277754bf15e6a7554d916.tar.bz2
poezio-17eb99eea718191b619277754bf15e6a7554d916.tar.xz
poezio-17eb99eea718191b619277754bf15e6a7554d916.zip
python 3 only. Fixes all EncodingError bugs :))))
Diffstat (limited to 'src/room.py')
-rw-r--r--src/room.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/room.py b/src/room.py
index 4fd7a799..e8bbd838 100644
--- a/src/room.py
+++ b/src/room.py
@@ -1,5 +1,3 @@
-# -*- coding:utf-8 -*-
-#
# Copyright 2010 Le Coz Florent <louizatakk@fedoraproject.org>
#
# This file is part of Poezio.
@@ -70,9 +68,9 @@ class Room(object):
Set the tab color and returns the txt color
"""
color = theme.COLOR_NORMAL_TEXT
- if not time and nickname and nickname.encode('utf-8') != self.own_nick and self.joined: # do the highlight
+ if not time and nickname and nickname != self.own_nick and self.joined: # do the highlight
try:
- if self.own_nick in txt.encode('utf-8'):
+ if self.own_nick in txt:
self.set_color_state(theme.COLOR_TAB_HIGHLIGHT)
color = theme.COLOR_HIGHLIGHT_TEXT
except UnicodeDecodeError:
@@ -134,7 +132,7 @@ class Room(object):
def get_user_by_name(self, nick):
for user in self.users:
- if user.nick == nick.encode('utf-8'):
+ if user.nick == nick:
return user
return None