Commit 28460d2f authored by louiz’'s avatar louiz’

Fix a crash on unknown role

parent a8476989
......@@ -26,6 +26,7 @@ import curses
import theme
ROLE_DICT = {
'':0,
'none':0,
'visitor':1,
'participant':2,
......@@ -47,6 +48,8 @@ class User(object):
self.affiliation = affiliation
self.show = show
self.status = status
if role not in ROLE_DICT: # avoid unvalid roles
role = ''
self.role = role
def change_nick(self, nick):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment