summaryrefslogtreecommitdiff
path: root/fsck-larch
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2012-11-17 19:16:02 +0000
committerLars Wirzenius <liw@liw.fi>2012-11-17 19:16:02 +0000
commit242960096014adcc7823e98ff14b9b752848cc38 (patch)
tree958c22b224e8c42b6588ab060c8f829e45dd6d5f /fsck-larch
parent7ae3886f48c31ee95957cf984accaa955af2831c (diff)
downloadlarch-242960096014adcc7823e98ff14b9b752848cc38.tar.gz
Return each work item as created, instead of list
This makes it possible to do smoother progress reporting.
Diffstat (limited to 'fsck-larch')
-rwxr-xr-xfsck-larch6
1 files changed, 3 insertions, 3 deletions
diff --git a/fsck-larch b/fsck-larch
index 9afe00d..aef6647 100755
--- a/fsck-larch
+++ b/fsck-larch
@@ -51,11 +51,11 @@ class Fsck(cliapp.Application):
forest = larch.open_forest(dirname=dirname)
fsck = larch.fsck.Fsck(forest, self.warning, self.error,
self.settings['fix'])
- fsck.find_work()
+ all_work = list(fsck.find_work())
- self.ts['checks'] = len(fsck.work)
+ self.ts['checks'] = len(all_work)
self.ts['check'] = 0
- for work in fsck.work:
+ for work in all_work:
self.ts['check'] += 1
self.ts['checkname'] = str(work)
work.do()