diff --git a/src/controller/buffersController.py b/src/controller/buffersController.py index 844c7519..7032652c 100644 --- a/src/controller/buffersController.py +++ b/src/controller/buffersController.py @@ -412,7 +412,7 @@ class baseBufferController(bufferController): self.buffer.list.remove_item(index) # if index > 0: except TwythonError: - sound.player.play("error.ogg") + self.session.sound.play("error.ogg") class eventsBufferController(bufferController): def __init__(self, parent, name, session, account, *args, **kwargs): diff --git a/src/sessionmanager/session.py b/src/sessionmanager/session.py index 64823f6c..06eea94e 100644 --- a/src/sessionmanager/session.py +++ b/src/sessionmanager/session.py @@ -170,7 +170,10 @@ class Session(object): finished = True except TwythonError as e: output.speak(e.message) - if report_failure and hasattr(e, 'message'): + if e.error_code != 403 and e.error_code != 404: + tries = tries+1 + time.sleep(5) + elif report_failure and hasattr(e, 'message'): output.speak(_("%s failed. Reason: %s") % (action, e.message)) finished = True except: diff --git a/src/twitter/twitter.py b/src/twitter/twitter.py index cc45c6d9..82e6bb1b 100644 --- a/src/twitter/twitter.py +++ b/src/twitter/twitter.py @@ -14,7 +14,7 @@ class twitter(object): def authorise(self, settings): httpd = BaseHTTPServer.HTTPServer(('127.0.0.1', 8080), authorisationHandler.handler) - twitter = Twython(keyring.get("app_key"), keyring.get("app_secret"), auth_endpoint='authorize') + twitter = Twython(keyring.get("api_key"), keyring.get("api_secret"), auth_endpoint='authorize') auth = twitter.get_authentication_tokens("http://127.0.0.1:8080") webbrowser.open_new_tab(auth['auth_url']) # global logged, verifier