Fix two bugs in the fstat() line, reported by Fredruk Lundh.

This commit is contained in:
Guido van Rossum 1998-10-07 14:06:03 +00:00
parent 2ccaf6f2f9
commit 56440a58f7
1 changed files with 1 additions and 1 deletions

View 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()