]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[lynda] Logout only when login info present (Closes #7500)
authorSergey M․ <dstftw@gmail.com>
Sat, 14 Nov 2015 10:43:58 +0000 (16:43 +0600)
committerSergey M․ <dstftw@gmail.com>
Sat, 14 Nov 2015 10:43:58 +0000 (16:43 +0600)
youtube_dl/extractor/lynda.py

index 9a207b2cd425ba2f1b173d9bd52730e511a52fa0..7d78a880593ee951adf9a9ec0e6d0cde6d46dfff 100644 (file)
@@ -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)