Răsfoiți Sursa

Fix mtime precision checks for python < 3.3

Jonas Borgström 12 ani în urmă
părinte
comite
88618e4132
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  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
 from attic.xattr import get_all
 
 
 # The mtime get/set precison varies on different OS and Python versions
 # 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
     st_mtime_ns_round = 0
 elif 'HAVE_UTIMES' in sysconfig.get_config_vars():
 elif 'HAVE_UTIMES' in sysconfig.get_config_vars():
-    st_mtime_ns_round = -3
+    st_mtime_ns_round = -4
 else:
 else:
     st_mtime_ns_round = -9
     st_mtime_ns_round = -9