glenn-jocher commited on
Commit
59beae9
1 Parent(s): 6649770

add if isfile() to get_hash()

Browse files
Files changed (1) hide show
  1. utils/datasets.py +1 -1
utils/datasets.py CHANGED
@@ -28,7 +28,7 @@ for orientation in ExifTags.TAGS.keys():
28
 
29
  def get_hash(files):
30
  # Returns a single hash value of a list of files
31
- return sum(os.path.getsize(f) for f in files)
32
 
33
 
34
  def exif_size(img):
 
28
 
29
  def get_hash(files):
30
  # Returns a single hash value of a list of files
31
+ return sum(os.path.getsize(f) for f in files if os.path.isfile(f))
32
 
33
 
34
  def exif_size(img):