[Python-Dev] Updates to PEP 471, the os.scandir() proposal (original) (raw)
Ethan Furman ethan at stoneleaf.us
Wed Jul 9 16:41:11 CEST 2014
- Previous message: [Python-Dev] Updates to PEP 471, the os.scandir() proposal
- Next message: [Python-Dev] Updates to PEP 471, the os.scandir() proposal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 07/09/2014 06:41 AM, Ethan Furman wrote:
Leave it up to the onerror handler. If it returns None, skip yielding the entry, otherwise yield whatever it returned -- which also means the error handler should be able to set fields on the DirEntry: def logerr(exc, entry): logger.warn("Cannot stat {}".format(exc.filename)) entry.lstat.stsize = 0 return True
Blah. Okay, either return the DirEntry (possibly modified), or have the log_err return entry instead of True. (Now where is that caffeine??)
--
Ethan
- Previous message: [Python-Dev] Updates to PEP 471, the os.scandir() proposal
- Next message: [Python-Dev] Updates to PEP 471, the os.scandir() proposal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]