浏览代码

Fix mtime precision checks for python < 3.3

Jonas Borgström 12 年之前
父节点
当前提交
88618e4132
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      attic/testsuite/__init__.py

+ 2 - 2
attic/testsuite/__init__.py

@@ -9,10 +9,10 @@ from attic.helpers import st_mtime_ns
 from attic.xattr import get_all
 
 # The mtime get/set precison varies on different OS and Python versions
-if 'HAVE_FUTIMENS' in posix._have_functions:
+if 'HAVE_FUTIMENS' in getattr(posix, '_have_functions', []):
     st_mtime_ns_round = 0
 elif 'HAVE_UTIMES' in sysconfig.get_config_vars():
-    st_mtime_ns_round = -3
+    st_mtime_ns_round = -4
 else:
     st_mtime_ns_round = -9