don't need to logout from dlfp if the browser hasn't been used

This commit is contained in:
Romain Bignon 2010-11-18 12:23:36 +01:00
commit bbd7b66413
2 changed files with 7 additions and 1 deletions

View file

@ -50,6 +50,10 @@ class DLFPBackend(BaseBackend, ICapMessages, ICapMessagesPost):
return self.create_browser(self.config['username'], self.config['password'])
def deinit(self):
# don't need to logout if the browser hasn't been used.
if not self._browser:
return
with self.browser:
self.browser.close_session()