Message357141
Hi Giampaolo,
I think it is more or less the same as the previous code, which was using os.list to return a list in memory. My first tentative fix was:
def copytree(src, ...):
entries = os.list(src)
return _copytree(entries=entries, ...)
But the previous PR also altered _copytree to use the return of os.scandir DirEntry's, so the change above results in AttributeError: 'str' object has no attribute 'name'.
Would be better to avoid using iterator to populate a list, and also using the DirEntry in _copytree, and just stick with the previous code with (i.e. os.listdir() and a single copytree method as before)? Or if you think we should go with your suggestion, I'm good with it as well - especially as it'd be a much simpler PR :)
Thanks
Bruno |
|
Date |
User |
Action |
Args |
2019-11-21 08:03:36 | kinow | set | recipients:
+ kinow, giampaolo.rodola, cboltz |
2019-11-21 08:03:36 | kinow | set | messageid: <1574323416.35.0.814017988442.issue38688@roundup.psfhosted.org> |
2019-11-21 08:03:36 | kinow | link | issue38688 messages |
2019-11-21 08:03:35 | kinow | create | |
|