Skip to content
This repository
Browse code

Try to avoid fuzzy date issue from Windows XP buildbot

  • Loading branch information...
commit c77138c93bb40fbf1c5440716bc43c65fc0e9b78 1 parent 8edd552
Peter Cock authored March 28, 2011

Showing 1 changed file with 3 additions and 5 deletions. Show diff stats Hide diff stats

  1. 8  do2to3.py
8  do2to3.py
@@ -136,12 +136,10 @@ def do_update(py2folder, py3folder, verbose=False):
136 136
                 continue
137 137
             #Python, C code, data files, etc - copy with date stamp etc
138 138
             shutil.copy2(old, new)
139  
-            assert round(os.stat(old).st_mtime*1000) == \
140  
-                   round(os.stat(new).st_mtime*1000), \
141  
-                   "Modified time not copied! %0.8f vs %0.8f, %i vs %i" \
  139
+            assert abs(os.stat(old).st_mtime-os.stat(new).st_mtime)<0.0001, \
  140
+                   "Modified time not copied! %0.8f vs %0.8f, diff %f" \
142 141
                    % (os.stat(old).st_mtime, os.stat(new).st_mtime,
143  
-                      round(os.stat(old).st_mtime*1000),
144  
-                      round(os.stat(new).st_mtime*1000))
  142
+                      abs(os.stat(old).st_mtime-os.stat(new).st_mtime))
145 143
             if f.endswith(".py"):
146 144
                 #Also run 2to3 on it
147 145
                 to_convert.append(new)

0 notes on commit c77138c

Please sign in to comment.
Something went wrong with that request. Please try again.