[bbc] Fix FutureWarning
authorSergey M․ <dstftw@gmail.com>
Fri, 16 Oct 2015 18:26:45 +0000 (00:26 +0600)
committerSergey M․ <dstftw@gmail.com>
Fri, 16 Oct 2015 18:26:45 +0000 (00:26 +0600)
youtube_dl/extractor/bbc.py

index 68995f81e95e318a9953890cfdb92aff23bc3f03..1b3a33e4e3493b4e6874581d3ca3adb05eb16884 100644 (file)
@@ -421,7 +421,7 @@ class BBCCoUkIE(InfoExtractor):
                 continue
             title = playlist.find('./{%s}title' % self._EMP_PLAYLIST_NS).text
             description_el = playlist.find('./{%s}summary' % self._EMP_PLAYLIST_NS)
-            description = description_el.text if description_el else None
+            description = description_el.text if description_el is not None else None
 
             def get_programme_id(item):
                 def get_from_attributes(item):