diff options
| author | Steven Knight <knight@baldmt.com> | 2005-05-13 01:44:10 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2005-05-13 01:44:10 (GMT) |
| commit | f82f4ce830289473187299db9962f819ed74c877 (patch) | |
| tree | f9abe466c67b9ca99adb91b2ff25529ca1096230 /src/engine/SCons/Script/SConscript.py | |
| parent | f431ccfa16fad1d0db1009eacfdace4f80e9195e (diff) | |
| download | SCons-f82f4ce830289473187299db9962f819ed74c877.zip SCons-f82f4ce830289473187299db9962f819ed74c877.tar.gz SCons-f82f4ce830289473187299db9962f819ed74c877.tar.bz2 | |
Eliminate multiple calls to os.stat() to fetch file info.
Diffstat (limited to 'src/engine/SCons/Script/SConscript.py')
| -rw-r--r-- | src/engine/SCons/Script/SConscript.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/engine/SCons/Script/SConscript.py b/src/engine/SCons/Script/SConscript.py index 7ca9993..af9d492 100644 --- a/src/engine/SCons/Script/SConscript.py +++ b/src/engine/SCons/Script/SConscript.py @@ -184,9 +184,8 @@ def _SConscript(fs, *files, **kw): # during the actual build phase. f.build() f.builder_set(None) - s = str(f) - if os.path.exists(s): - _file_ = open(s, "r") + if f.exists(): + _file_ = open(str(f), "r") if _file_: # Chdir to the SConscript directory. Use a path # name relative to the SConstruct file so that if |
