diff options
| author | Scott Gasch <[email protected]> | 2021-04-23 17:15:28 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2021-04-23 17:15:28 -0700 |
| commit | 14e59477d473a81cf3e5aa1e9401b8a6fd88751a (patch) | |
| tree | b02fb2573751f6352ea612ffc72877beb4aaf2db | |
| parent | 1389214956da969e5a908ee57bd878303256a375 (diff) | |
Avoid directory writes when files are already there.
| -rw-r--r-- | directory_filter.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/directory_filter.py b/directory_filter.py index 9fa13c2..8bced60 100644 --- a/directory_filter.py +++ b/directory_filter.py @@ -4,11 +4,10 @@ import hashlib import os from typing import Any, Optional -import predicate import file_utils -class DirectoryFileFilter(predicate.Predicate): +class DirectoryFileFilter(object): """A predicate that will return False if when a proposed file's content to-be-written is identical to the contents of the file; skip the write. @@ -75,4 +74,3 @@ class DirectoryAllFilesFilter(DirectoryFileFilter): mem_hash.update(item) md5 = mem_hash.hexdigest() return md5 not in self.all_md5s - |
