Opened 6 years ago

Closed 6 years ago

#5971 closed defect (fixed)

TB: NameError: global name 'reason' is not defined when destroying a room

Reported by: Zash Owned by:
Priority: normal Milestone: 0.15
Component: None Version: hg
Severity: normal Keywords: patch
Cc: Blocked By:
Blocking: OS: All

Description

Bug description

Traceback (most recent call last):
  File "/home/zash/src/gajim/src/common/xmpp/idlequeue.py", line 528, in _process_events
    return IdleQueue._process_events(self, fd, flags)
  File "/home/zash/src/gajim/src/common/xmpp/idlequeue.py", line 393, in _process_events
    obj.pollin()
  File "/home/zash/src/gajim/src/common/xmpp/transports_nb.py", line 414, in pollin
    self._do_receive()
  File "/home/zash/src/gajim/src/common/xmpp/transports_nb.py", line 600, in _do_receive
    self._on_receive(received)
  File "/home/zash/src/gajim/src/common/xmpp/transports_nb.py", line 614, in _on_receive
    self.on_receive(data)
  File "/home/zash/src/gajim/src/common/xmpp/dispatcher_nb.py", line 452, in dispatch
    handler['func'](session, stanza)
  File "/home/zash/src/gajim/src/common/connection_handlers.py", line 1773, in _presenceCB
    conn=self, iq_obj=prs))
  File "/home/zash/src/gajim/src/common/nec.py", line 62, in push_incoming_event
    self._generate_events_based_on_incoming_event(event_object)
  File "/home/zash/src/gajim/src/common/nec.py", line 80, in _generate_events_based_on_incoming_event
    if new_event_object.generate():
  File "/home/zash/src/gajim/src/common/connection_handlers_events.py", line 720, in generate
    conn=self.conn, iq_obj=self.iq_obj, presence_obj=self))
  File "/home/zash/src/gajim/src/common/nec.py", line 61, in push_incoming_event
    gajim.ged.raise_event(event_object.name, event_object)
  File "/home/zash/src/gajim/src/common/ged.py", line 70, in raise_event
    if handler(*args, **kwargs):
  File "/home/zash/src/gajim/src/groupchat_control.py", line 1399, in _nec_gc_presence_received
    self.print_conversation(reason, 'info', graphics=False)
NameError: global name 'reason' is not defined

Steps to reproduce

Destroy a room without entering a reason

Attachments (1)

5971.patch (601 bytes) - added by Zash 6 years ago.

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by Zash

comment:1 Changed 6 years ago by Zash

  • Keywords patch added

It was when handling the <presence/> saying the room was destroyed. Attached a patch that seems to fix it.

comment:2 Changed 6 years ago by Yann Leboulanger <asterix@…>

  • Milestone set to 0.15
  • Resolution set to fixed
  • Status changed from new to closed

(In [54e44a287300]) [Zash] fix wrong var name. Fixes #5971

Note: See TracTickets for help on using tickets.