]> granicus.if.org Git - python/commitdiff
Merged revisions 71750 via svnmerge from
authorMark Dickinson <dickinsm@gmail.com>
Sun, 19 Apr 2009 17:14:11 +0000 (17:14 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Sun, 19 Apr 2009 17:14:11 +0000 (17:14 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71750 | mark.dickinson | 2009-04-19 18:10:47 +0100 (Sun, 19 Apr 2009) | 3 lines

  Automatic conversion of floats to integers for struct.pack integer codes
  is deprecated.  Use an explicit int() instead.
........

Lib/compileall.py

index 8c678e43bef9532b18142aa9ff5c8ea33430b0ca..9451a60aa964561f7a84497d73f03d49fbb384d8 100644 (file)
@@ -57,7 +57,7 @@ def compile_dir(dir, maxlevels=10, ddir=None,
             if tail == '.py':
                 if not force:
                     try:
-                        mtime = os.stat(fullname).st_mtime
+                        mtime = int(os.stat(fullname).st_mtime)
                         expect = struct.pack('<4sl', imp.get_magic(), mtime)
                         cfile = fullname + (__debug__ and 'c' or 'o')
                         with open(cfile, 'rb') as chandle: