File tree 1 file changed +4
-3
lines changed 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 5
5
import os
6
6
import threading
7
7
8
+ from botocore .exceptions import ClientError
8
9
from funcy import cached_property , wrap_prop
9
10
10
11
from dvc .config import Config
@@ -212,8 +213,8 @@ def isfile(self, path_info):
212
213
return False
213
214
214
215
try :
215
- self .get_head_object ( self . s3 , path_info .bucket , path_info .path )
216
- except DvcException :
216
+ self .s3 . head_object ( Bucket = path_info .bucket , Key = path_info .path )
217
+ except ClientError :
217
218
return False
218
219
219
220
return True
@@ -224,7 +225,7 @@ def exists(self, path_info):
224
225
225
226
eg: if `data/file.txt` exists, check for `data` should return True
226
227
"""
227
- return True if self .isfile (path_info ) else self .isdir (path_info )
228
+ return self .isfile (path_info ) or self .isdir (path_info )
228
229
229
230
def makedirs (self , path_info ):
230
231
# We need to support creating empty directories, which means
You can’t perform that action at this time.
0 commit comments