[Python-checkins] r71750 - python/trunk/Lib/compileall.py

mark.dickinson python-checkins at python.org
Sun Apr 19 19:10:47 CEST 2009


Author: mark.dickinson
Date: Sun Apr 19 19:10:47 2009
New Revision: 71750

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


Modified:
   python/trunk/Lib/compileall.py

Modified: python/trunk/Lib/compileall.py
==============================================================================
--- python/trunk/Lib/compileall.py	(original)
+++ python/trunk/Lib/compileall.py	Sun Apr 19 19:10:47 2009
@@ -57,7 +57,7 @@
             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:


More information about the Python-checkins mailing list