From f1863faf502c21c5f36908d9a0858ba5d00173f7 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 13 Dec 2014 15:56:17 +0100 Subject: [PATCH] os.walk is generator --- oml/update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oml/update.py b/oml/update.py index f16d4fa..57f7dd2 100644 --- a/oml/update.py +++ b/oml/update.py @@ -83,7 +83,7 @@ def download(): current_files.add(os.path.basename(module_tar)) with open(os.path.join(settings.updates_path, 'release.json'), 'wb') as fd: fd.write(release_data) - for f in set(os.walk(settings.updates_path).next()[2])-current_files: + for f in set(next(os.walk(settings.updates_path))[2])-current_files: os.unlink(os.path.join(settings.updates_path, f)) return True return True