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
New submission from Michal Čihař mic...@cihar.com:
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
Michal Čihař mic...@cihar.com added the comment:
Well in this particular case (/dev/urandom is regular file), it might make
sense to simply raise NotImplementedError
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10824
Michal Čihař mic...@cihar.com 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