Quellcode durchsuchen

fix using dulwich on windows

Chaiwat Suttipongsakul vor 10 Jahren
Ursprung
Commit
1697076058
1 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen
  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