]> granicus.if.org Git - python/commitdiff
Fix two bugs in the fstat() line, reported by Fredruk Lundh.
authorGuido van Rossum <guido@python.org>
Wed, 7 Oct 1998 14:06:03 +0000 (14:06 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 7 Oct 1998 14:06:03 +0000 (14:06 +0000)
Lib/py_compile.py

index a6d03d7b3eedf72a354d06358f2d6fee608a72e2..e1d0d70babeee1976bc44995b0df5b972a9b33dc 100644 (file)
@@ -44,7 +44,7 @@ def compile(file, cfile=None, dfile=None):
     import os, marshal, __builtin__
     f = open(file)
     try:
-        timestamp = os.fstat(file.fileno())
+        timestamp = long(os.fstat(f.fileno())[8])
     except AttributeError:
         timestamp = long(os.stat(file)[8])
     codestring = f.read()