From 59beae98e8fe596016ecfb94d53b949e0fefbfca Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 9 Jul 2020 20:57:24 -0700 Subject: [PATCH] add if isfile() to get_hash() --- utils/datasets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/datasets.py b/utils/datasets.py index 9bf8734..fe965f7 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -28,7 +28,7 @@ for orientation in ExifTags.TAGS.keys(): def get_hash(files): # Returns a single hash value of a list of files - return sum(os.path.getsize(f) for f in files) + return sum(os.path.getsize(f) for f in files if os.path.isfile(f)) def exif_size(img):