aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-11-14 16:43:58 +0600
committerSergey M․ <dstftw@gmail.com>2015-11-14 16:43:58 +0600
commit903d1369428f72397dbc698654dbad445ecaf2ac (patch)
treee478069202dac4802db327b040955471e3eb65ab
parent9d584da7d0fd207d46e1592b25244cfcad4354ed (diff)
[lynda] Logout only when login info present (Closes #7500)
-rw-r--r--youtube_dl/extractor/lynda.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/extractor/lynda.py b/youtube_dl/extractor/lynda.py
index 9a207b2cd..7d78a8805 100644
--- a/youtube_dl/extractor/lynda.py
+++ b/youtube_dl/extractor/lynda.py
@@ -83,6 +83,10 @@ class LyndaBaseIE(InfoExtractor):
raise ExtractorError('Unable to log in')
def _logout(self):
+ username, _ = self._get_login_info()
+ if username is None:
+ return
+
self._download_webpage(
'http://www.lynda.com/ajax/logout.aspx', None,
'Logging out', 'Unable to log out', fatal=False)