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): ...@@ -448,7 +448,8 @@ def walk_with_symlinks(top, func, arg):
""" """
try: try:
names = os.listdir(top) names = os.listdir(top)
except os.error: except os.error, why:
print "Error listing %r: %s" % (top, why)
return return
func(arg, top, names) func(arg, top, names)
exceptions = ('.', '..') 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