diff options
| author | Steven Knight <knight@baldmt.com> | 2004-09-15 01:27:00 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2004-09-15 01:27:00 (GMT) |
| commit | 971c19dc69105c23d90fcbc307e477342437049a (patch) | |
| tree | 56d5af18b8c947dee1f99b1a25aa7a5a80e7309b /src/engine | |
| parent | 7fef06f597626b9ee3faa0aa716819258e583812 (diff) | |
| download | SCons-971c19dc69105c23d90fcbc307e477342437049a.zip SCons-971c19dc69105c23d90fcbc307e477342437049a.tar.gz SCons-971c19dc69105c23d90fcbc307e477342437049a.tar.bz2 | |
Fix Delete action for non-existent files and must_exist=1 under Python 2.3. (Kevin Quick)
Diffstat (limited to 'src/engine')
| -rw-r--r-- | src/engine/SCons/Defaults.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/engine/SCons/Defaults.py b/src/engine/SCons/Defaults.py index a99850b..6ebc6eb 100644 --- a/src/engine/SCons/Defaults.py +++ b/src/engine/SCons/Defaults.py @@ -184,7 +184,7 @@ Copy = ActionFactory(copy_func, def delete_func(entry, must_exist=0): if not must_exist and not os.path.exists(entry): return None - if os.path.isfile(entry): + if not os.path.exists(entry) or os.path.isfile(entry): return os.unlink(entry) else: return shutil.rmtree(entry, 1) |
