浏览代码

Python 2.6 compatibility fix. Thanks @Jamesc359 - closes #400

Filippo Valsorda 13 年之前
父节点
当前提交
9bb8dc8e42
共有 2 个文件被更改,包括 1 次插入1 次删除
  1. 二进制
      youtube-dl
  2. 1 1
      youtube_dl/utils.py

二进制
youtube-dl


+ 1 - 1
youtube_dl/utils.py

@@ -223,7 +223,7 @@ def encodeFilename(s):
 
 	assert type(s) == type(u'')
 
-	if sys.platform == 'win32' and sys.getwindowsversion().major >= 5:
+	if sys.platform == 'win32' and sys.getwindowsversion()[0] >= 5:
 		# Pass u'' directly to use Unicode APIs on Windows 2000 and up
 		# (Detecting Windows NT 4 is tricky because 'major >= 4' would
 		# match Windows 9x series as well. Besides, NT 4 is obsolete.)