[youku] check for the correct variable
[youtube-dl] / youtube_dl / extractor / youku.py
index d33caa79ea4accdd6fd5e5d8cfb6a8457ae288b8..3a3432be85464ecdee517620b5e0cf9f3534d0d8 100644 (file)
@@ -221,7 +221,7 @@ class YoukuIE(InfoExtractor):
                     'Youku said: Sorry, this video is available in China only', expected=True)
             else:
                 msg = 'Youku server reported error %i' % error.get('code')
-                if error is not None:
+                if error_note is not None:
                     msg += ': ' + error_note
                 raise ExtractorError(msg)