浏览代码

fix using dulwich on windows

Chaiwat Suttipongsakul 10 年之前
父节点
当前提交
1697076058
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      dulwich/pack.py

+ 3 - 2
dulwich/pack.py

@@ -48,6 +48,7 @@ except ImportError:
     izip = zip
 
 import os
+import sys
 
 try:
     import mmap
@@ -56,8 +57,8 @@ except ImportError:
 else:
     has_mmap = True
 
-# For some reason the above try, except fails to set has_mmap = False
-if os.uname()[0] == 'Plan9':
+# For some reason the above try, except fails to set has_mmap = False for plan9
+if sys.platform == 'Plan9':
     has_mmap = False
 
 from hashlib import sha1