Skip to content

Commit

Permalink
Merge pull request #24 from liulanzheng/main
Browse files Browse the repository at this point in the history
fix connector open for fd
  • Loading branch information
yuchen0cc authored Dec 27, 2024
2 parents 6debb29 + 54be559 commit 9a6ac97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion oss-model-connector/ossmodelconnector/oss_model_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ def _from_file_helper(self, filename, shared, nbytes):
def _connector_open(self, file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None):
if isinstance(file, pathlib.Path):
file = str(file)
if self._hook_dir and file.startswith(self._hook_dir):

if self._hook_dir and isinstance(file, str) and file.startswith(self._hook_dir):
binary = False
if 'b' in mode:
binary = True
Expand Down

0 comments on commit 9a6ac97

Please sign in to comment.