Avoid directory writes when files are already there.
authorScott Gasch <[email protected]>
Sat, 24 Apr 2021 00:15:28 +0000 (17:15 -0700)
committerScott Gasch <[email protected]>
Sat, 24 Apr 2021 00:15:28 +0000 (17:15 -0700)
directory_filter.py

index 9fa13c2c1169c9895af5de7c4494627cd972d735..8bced6008cfe6a24e410063a92212e77996c2b10 100644 (file)
@@ -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
-