##// END OF EJS Templates
Work around a bug in setting and getting the mtime in python 2...
Jason Grout -
Show More
@@ -61,7 +61,9 b' def _should_copy(src, dest, verbose=1):'
61 """should a file be copied?"""
61 """should a file be copied?"""
62 if not os.path.exists(dest):
62 if not os.path.exists(dest):
63 return True
63 return True
64 if os.stat(dest).st_mtime < os.stat(src).st_mtime:
64 if os.stat(src).st_mtime - os.stat(dest).st_mtime > 1e-6:
65 # we add a fudge factor to work around a bug in python 2.x
66 # that was fixed in python 3.x: http://bugs.python.org/issue12904
65 if verbose >= 2:
67 if verbose >= 2:
66 print("%s is out of date" % dest)
68 print("%s is out of date" % dest)
67 return True
69 return True
General Comments 0
You need to be logged in to leave comments. Login now