Traceback occurs when attempting a /command

Bug #925702 reported by John S. Gruber
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Lernid
Low
Mohammad AbuShady

Bug Description

Traceback (most recent call last):
  File "/home/ubuntu/lernid-0.8.2.2~lr2build1/lernid/widgets/NativeChatroom.py", line 181, in _send_text
    self._append_to_buffer(_('IRC commands are not yet supported.'))
  File "/home/ubuntu/lernid-0.8.2.2~lr2build1/lernid/widgets/IrcWidget.py", line 83, in _append_to_buffer
    elif self._on_faculty(sender):
  File "/home/ubuntu/lernid-0.8.2.2~lr2build1/lernid/widgets/Schedule.py", line 219, in on_faculty
    return self._current_session and name.lower() in \
AttributeError: 'NoneType' object has no attribute 'lower'

The solution is probably to look for a sender of None on or about line 83 in lernid/widgets/IrcWidget.py and to avoid the faculty check.

Related branches

Changed in lernid:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Mohammad AbuShady (coalwater) wrote :

are we supposed to serve those commands, or ignore them?

Revision history for this message
John S. Gruber (jsjgruber) wrote :

They should be ignored.

The code tries to append an error message to the chatroom stream, and fails because the error message is appended without specifying a sender, which defaults to none. There's code above the line above that handles the sender==None case, but it isn't handled here, so there is a problem. The code in this function should probably be reviewed for any other sender==None cases.

Changed in lernid:
status: Triaged → In Progress
assignee: nobody → Mohammad AbuShady (coalwater)
Changed in lernid:
milestone: none → 0.8.5
Changed in lernid:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers