File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -80,8 +80,15 @@ def authenticate_for_test(userid, userpwd):
8080
8181
8282def stat (endpoint , fileref , userid ):
83- resource = Resource .from_file_ref_and_endpoint (fileref , endpoint )
84- statInfo = client .file .stat (Auth .check_token (userid ), resource )
83+ try :
84+ resource = Resource .from_file_ref_and_endpoint (fileref , endpoint )
85+ statInfo = client .file .stat (Auth .check_token (userid ), resource )
86+ except cs3client .exceptions .UnknownException as e :
87+ log .error (
88+ 'msg="Invoked stat" endpoint="%s" fileref="%s" exception="%s"' %
89+ (endpoint , fileref , str (e ).replace ('\n ' , ' ' ))
90+ )
91+ raise IOError (f"Stat failed for { fileref } " ) from e
8592 if statInfo .type == cs3spr .RESOURCE_TYPE_CONTAINER :
8693 log .info (
8794 'msg="Invoked stat" endpoint="%s" fileref="%s" trace="%s" result="ISDIR"'
You can’t perform that action at this time.
0 commit comments