diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2019-01-27 01:56:15 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2019-01-27 18:52:08 +0100 |
commit | e66b63bcedc7ba31faa6228a75ec4b6d8ce70265 (patch) | |
tree | fc9659dc607e35c25a333f6bcc1b618e2035c98f /_pytest/test_unfurl.py | |
parent | 617704145f787911fcce8b19ab71be317cd585fa (diff) | |
download | wee-slack-e66b63bcedc7ba31faa6228a75ec4b6d8ce70265.tar.gz |
Delete buffer from our own list before closing it
When we close a buffer, weechat invokes a callback so we can unregister
the channel. However, when we close the buffer ourselves in the
unregister function it caused the unregister function to be called
again. By deleting the buffer from our list first, the second invokation
of unregister won't find the channel, so the rest isn't run again.
This prevents an error from weechat when we sent None into buffer_clear
because the channel_buffer had already been set to None.
Also does some cleanup. Use global EVENTROUTER, check if channel exists
instead of catching exception and remove some unnecessary checks.
Diffstat (limited to '_pytest/test_unfurl.py')
0 files changed, 0 insertions, 0 deletions