Revert previous commit, move loggging, fix type error

This reverts commit 627f751e.
Signed-off-by: Maxime Buquet's avatarMaxime “pep” Buquet <pep@bouah.net>
parent 627f751e
Pipeline #3383 passed with stages
in 8 minutes and 31 seconds
......@@ -83,17 +83,15 @@ class User:
self.nick = nick
def change_color(self, color_name: Optional[str], deterministic=False):
if color_name is None:
color = xhtml.colors.get(color_name or '')
if color is None:
if deterministic:
self.set_deterministic_color()
else:
log.error('Unknown color "%s"', color_name)
self.color = choice(get_theme().LIST_COLOR_NICKNAMES)
else:
color = xhtml.colors.get(color_name)
if color is None:
log.error('Unknown color "%s"', color_name)
else:
self.color = (color, -1)
self.color = (color, -1)
def set_last_talked(self, time: datetime):
"""
......
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