Skip to content

Commit

Permalink
Bug: Fix isfile and isdir do not return bool value (#161)
Browse files Browse the repository at this point in the history
* Bug: Fix isfile and isdir do not return bool value

* Bug: Fix isfile and isdir do not return bool value
  • Loading branch information
yanghua authored Sep 29, 2024
1 parent 0d2fa4b commit 3676906
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tosfs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ def isdir(self, path: str) -> bool:

try:
return retryable_func_executor(
lambda: self.tos_client.head_object(bucket, key) or True,
lambda: self.tos_client.head_object(bucket, key) and True,
max_retry_num=self.max_retry_num,
)
except TosClientError as e:
Expand Down Expand Up @@ -818,7 +818,7 @@ def isfile(self, path: str) -> bool:

try:
return retryable_func_executor(
lambda: self.tos_client.head_object(bucket, key) or True,
lambda: self.tos_client.head_object(bucket, key) and True,
max_retry_num=self.max_retry_num,
)
except TosClientError as e:
Expand Down

0 comments on commit 3676906

Please sign in to comment.