瀏覽代碼

Proper warning if xml.etree.ElementTree is not available

Philipp Hagemeister 14 年之前
父節點
當前提交
afb5b55de6
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      youtube-dl

+ 2 - 2
youtube-dl

@@ -66,8 +66,8 @@ except ImportError:
 
 try:
 	import xml.etree.ElementTree
-except ImportError: # Python<2.5
-	pass # Not officially supported, but let it slip
+except ImportError: # Python<2.5: Not officially supported, but let it slip
+	warnings.warn('xml.etree.ElementTree support is missing. Consider upgrading to Python >= 2.5 if you get related errors.')
 
 std_headers = {
 	'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:5.0.1) Gecko/20100101 Firefox/5.0.1',