소스 검색

[lynda] Logout only when login info present (Closes #7500)

Sergey M․ 10 년 전
부모
커밋
903d136942
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      youtube_dl/extractor/lynda.py

+ 4 - 0
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)