mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-23 03:38:08 -06:00
Avoid giving false positive errors when buffers are updating
This commit is contained in:
parent
9cb6eafbbc
commit
2f263a23b7
@ -1326,16 +1326,19 @@ class Controller(object):
|
||||
i.start_stream()
|
||||
else:
|
||||
i.start_stream(play_sound=False)
|
||||
except TweepError:
|
||||
buff = self.view.search(i.name, i.account)
|
||||
i.remove_buffer(force=True)
|
||||
commonMessageDialogs.blocked_timeline()
|
||||
if self.get_current_buffer() == i:
|
||||
self.right()
|
||||
self.view.delete_buffer(buff)
|
||||
self.buffers.remove(i)
|
||||
del i
|
||||
continue
|
||||
except TweepError as err:
|
||||
log.exception("Error %s starting buffer %s on account %s, with args %r and kwargs %r due to the following reason: %s" % (err.api_code, i.name, i.account, i.args, i.kwargs, err.reason))
|
||||
# Determine if this error was caused by a block applied to the current user (IE permission errors).
|
||||
if err.api_code != None: # A twitter error, so safely try to remove the buffer.
|
||||
buff = self.view.search(i.name, i.account)
|
||||
i.remove_buffer(force=True)
|
||||
commonMessageDialogs.blocked_timeline()
|
||||
if self.get_current_buffer() == i:
|
||||
self.right()
|
||||
self.view.delete_buffer(buff)
|
||||
self.buffers.remove(i)
|
||||
del i
|
||||
continue
|
||||
if change_title:
|
||||
pub.sendMessage("buffer-title-changed", buffer=i)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user