--- a/mercurial/pure/osutil.py Sun Dec 18 02:08:59 2016 +0530
+++ b/mercurial/pure/osutil.py Mon Dec 19 00:16:52 2016 +0530
@@ -159,7 +159,7 @@
else:
listdir = listdirpure
-if os.name != 'nt':
+if pycompat.osname != 'nt':
posixfile = open
_SCM_RIGHTS = 0x01