mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -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
|
if buffer != None: break
|
||||||
else:
|
else:
|
||||||
buffer = self.view.search("home_timeline", buf.session.db["user_name"])
|
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):
|
def up(self, *args, **kwargs):
|
||||||
page = self.get_current_buffer()
|
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 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:
|
if self.settings["twitter"]["user_key"] != None and self.settings["twitter"]["user_secret"] != None:
|
||||||
log.debug("Logging in to twitter...")
|
try:
|
||||||
self.twitter.login(self.settings["twitter"]["user_key"], self.settings["twitter"]["user_secret"], verify_credentials)
|
log.debug("Logging in to twitter...")
|
||||||
self.logged = True
|
self.twitter.login(self.settings["twitter"]["user_key"], self.settings["twitter"]["user_secret"], verify_credentials)
|
||||||
log.debug("Logged.")
|
self.logged = True
|
||||||
self.counter = 0
|
log.debug("Logged.")
|
||||||
|
self.counter = 0
|
||||||
|
except:
|
||||||
|
log.error("The login attempt failed.")
|
||||||
|
self.logged = False
|
||||||
else:
|
else:
|
||||||
self.logged = False
|
self.logged = False
|
||||||
raise Exceptions.RequireCredentialsSessionError
|
raise Exceptions.RequireCredentialsSessionError
|
||||||
|
Loading…
Reference in New Issue
Block a user