Commit 457d33d3 authored by Dmitry Vasiliev's avatar Dmitry Vasiliev

os.listdir() now prints errors on stdout

parent 057ac364
......@@ -448,7 +448,8 @@ def walk_with_symlinks(top, func, arg):
"""
try:
names = os.listdir(top)
except os.error:
except os.error, why:
print "Error listing %r: %s" % (top, why)
return
func(arg, top, names)
exceptions = ('.', '..')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment