Replace os.path.walk with os.walk

os.path.walk was removed in python-3
This commit is contained in:
ZyX 2014-09-14 17:09:36 +04:00
parent 4e91f18908
commit eae7d1ff42
1 changed files with 3 additions and 2 deletions

View File

@ -154,9 +154,10 @@ class UvTreeWatcher(UvWatcher):
self.watch_directory(self.basedir)
def watch_directory(self, path):
os.path.walk(normpath(path, self.fenc), self.watch_one_directory, None)
for root, dirs, files in os.walk(normpath(path, self.fenc)):
self.watch_one_directory(root)
def watch_one_directory(self, arg, dirname, fnames):
def watch_one_directory(self, dirname):
try:
self.watch(dirname)
except OSError: