New submission from Michal Čihař :
The onerror callback is called with os.lstat when the actual failing function
is os.open.
To reproduce create directory that can not be listed:
import os
import shutil
def onerror(func, path, exc_info):
print(func)
os.mkdir("test")
os.chmod
Michal Čihař added the comment:
Yes, it was blocking, but deep in some program (which was actually called by
dpkg postinst script), so it took some time to figure out.
I don't think it's that fragile to figure out whether it is regular file using
os.path.isfile.
Indeed it wa
Michal Čihař added the comment:
Well in this particular case (/dev/urandom is regular file), it might make
sense to simply raise NotImplementedError
--
___
Python tracker
<http://bugs.python.org/issue10
New submission from Michal Čihař :
Currently if /dev/urandom does not provide any data, unradom() call is just
stuck infinitely waiting for data.
I actually faced this issue when /dev/urandom was empty regular file (due to
bug in pbuilder, but I don't think it matters how it did happen