diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-03-11 10:37:49 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-03-11 10:37:49 +0000 |
commit | 0e49c9b229f4ee1b67089f2b4695cdad1a839aff (patch) | |
tree | e09a7f2988810b88f9031128078aef2687573583 | |
parent | 9f13139910f37898fdeb4b104db025c97e3f7980 (diff) | |
download | dupfiles-0e49c9b229f4ee1b67089f2b4695cdad1a839aff.tar.gz |
Improve progress reporting
-rwxr-xr-x | dupfiles | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -92,15 +92,15 @@ class DuplicateFileFinder(object): def collect(self, root): ts = ttystatus.TerminalStatus() if self.progress: - ts.add(ttystatus.Literal('Scanning ')) - ts.add(ttystatus.Pathname('dirname')) + ts.format('Scanning: %Counter(filename) found') + ts.notify('Directory %s' % root) for dirname, subdirs, filenames in os.walk(root): - ts['dirname'] = dirname subdirs.sort() filenames.sort() pathnames = [os.path.join(dirname, f) for f in filenames] for pathname in pathnames: + ts['filename'] = pathname st = os.lstat(pathname) if stat.S_ISREG(st.st_mode): t = (st.st_dev, st.st_ino, pathname) |