From: Guido van Rossum Date: Wed, 7 Oct 1998 14:06:03 +0000 (+0000) Subject: Fix two bugs in the fstat() line, reported by Fredruk Lundh. X-Git-Tag: v1.5.2a2~117 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=56440a58f7a9e4aff1877c86772c846093ea5fd3;p=python Fix two bugs in the fstat() line, reported by Fredruk Lundh. --- diff --git a/Lib/py_compile.py b/Lib/py_compile.py index a6d03d7b3e..e1d0d70bab 100644 --- a/Lib/py_compile.py +++ b/Lib/py_compile.py @@ -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()