mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
TWBlue can run successfully if there are no sessions configured to run at program startup or the Internet connection doesn't work (for example, you are behind a proxy but you haven't configured it yet)
This commit is contained in:
parent
b165d564e0
commit
1061967adc
@ -994,7 +994,8 @@ class Controller(object):
|
||||
if buffer != None: break
|
||||
else:
|
||||
buffer = self.view.search("home_timeline", buf.session.db["user_name"])
|
||||
self.view.change_buffer(buffer)
|
||||
if buffer!=None:
|
||||
self.view.change_buffer(buffer)
|
||||
|
||||
def up(self, *args, **kwargs):
|
||||
page = self.get_current_buffer()
|
||||
|
@ -135,11 +135,15 @@ class Session(object):
|
||||
if the user account isn't authorised, it needs to call self.authorise() before login."""
|
||||
|
||||
if self.settings["twitter"]["user_key"] != None and self.settings["twitter"]["user_secret"] != None:
|
||||
log.debug("Logging in to twitter...")
|
||||
self.twitter.login(self.settings["twitter"]["user_key"], self.settings["twitter"]["user_secret"], verify_credentials)
|
||||
self.logged = True
|
||||
log.debug("Logged.")
|
||||
self.counter = 0
|
||||
try:
|
||||
log.debug("Logging in to twitter...")
|
||||
self.twitter.login(self.settings["twitter"]["user_key"], self.settings["twitter"]["user_secret"], verify_credentials)
|
||||
self.logged = True
|
||||
log.debug("Logged.")
|
||||
self.counter = 0
|
||||
except:
|
||||
log.error("The login attempt failed.")
|
||||
self.logged = False
|
||||
else:
|
||||
self.logged = False
|
||||
raise Exceptions.RequireCredentialsSessionError
|
||||
|
Loading…
Reference in New Issue
Block a user