Commit 11781ab8 authored by Dmitry Vasiliev's avatar Dmitry Vasiliev

os.listdir() now prints errors on stdout

parent b0ae7ac3
...@@ -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