Conversation
| env.copy_from_cache(cachefile, t.get_internal_path()) | ||
| try: | ||
| env.copy_from_cache(cachefile, t.get_internal_path()) | ||
| except (shutil.SameFileError, IOError) as e: |
There was a problem hiding this comment.
I don't think the SameFileError is going to leave a remnant, as it's raised before any copying is attempted.
|
Upgrading to the latest version of SCons and sad to discover my local patching for this issue is still valuable. Also seems like a slight overlap with #4085? |
|
Wouldn't it be fun if "transient" cache problems were easier to reproduce on demand for testing? Yeah, we should revisit this. Usually when something is tagged WIP it tends not to get merged until the reason for it having been flagged Work-In-Progress is resolved. There doesn't seem to be a lot of trail here as to why this is WIP. |
| # to. | ||
| t.fs.unlink(t.get_internal_path()) | ||
| cd.CacheDebug('CacheRetrieve(%s): Error while retrieving from %s deleting %s\n', t, cachefile) | ||
| raise e |
There was a problem hiding this comment.
Here shouldn't we behave as if the file were not in the cache, i.e. return 1, rather than raise?
…tions shutil.SameFileError, IOError for the default copy shutil.copy(). Move notice that file has been retrieved until after the file has actually been copied and didn't thrown exception
d762763 to
3b7bac6
Compare
Continuing the work from #3819
Contributor Checklist:
CHANGES.txt(and read theREADME.rst)