From 5f954e6f462b977e7bab2753b507ac4f6df5215f Mon Sep 17 00:00:00 2001 From: Bezleputh Date: Sun, 25 May 2014 09:48:39 +0200 Subject: [PATCH] [twitter] better non logged management --- modules/twitter/backend.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/twitter/backend.py b/modules/twitter/backend.py index 3b67125d..e429e6ad 100644 --- a/modules/twitter/backend.py +++ b/modules/twitter/backend.py @@ -46,7 +46,13 @@ class TwitterBackend(BaseBackend, ICapMessages, ICapMessagesPost, ICapCollection Value('profils_subscribe', label='Profils subscribe', default='')) def create_default_browser(self): - return self.create_browser(self.config['username'].get(), self.config['password'].get()) + username = self.config['username'].get() + if username: + password = self.config['password'].get() + else: + password = None + + return self.create_browser(username, password) def iter_threads(self): if self.config['username'].get(): @@ -61,7 +67,6 @@ class TwitterBackend(BaseBackend, ICapMessages, ICapMessagesPost, ICapCollection tweets.sort(key=lambda o: o.date, reverse=True) return tweets - def get_thread(self, _id, thread=None, getseen=True): seen = None if getseen: