From 69505f312ac326a61cd338a1169c819eac69ce15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sat, 13 Apr 2013 12:48:48 +0200 Subject: [PATCH] gdcvault: only log out when actually logged in --- modules/gdcvault/browser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/gdcvault/browser.py b/modules/gdcvault/browser.py index 34708003..e154048c 100644 --- a/modules/gdcvault/browser.py +++ b/modules/gdcvault/browser.py @@ -81,7 +81,9 @@ class GDCVaultBrowser(BaseBrowser): raise BrowserIncorrectPassword() def close_session(self): - # XXX: only if is_logged? or was used? + if self.password is None or not self.is_logged(): + return + self.openurl('/logout', '') @id2url(GDCVaultVideo.id2url)