Skip to content

Commit 54be559

Browse files
committed
fix connector open for fd
Signed-off-by: liulanzheng <[email protected]>
1 parent f81ffde commit 54be559

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

oss-model-connector/ossmodelconnector/oss_model_connector.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ def _from_file_helper(self, filename, shared, nbytes):
116116
def _connector_open(self, file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None):
117117
if isinstance(file, pathlib.Path):
118118
file = str(file)
119-
if self._hook_dir and file.startswith(self._hook_dir):
119+
120+
if self._hook_dir and isinstance(file, str) and file.startswith(self._hook_dir):
120121
binary = False
121122
if 'b' in mode:
122123
binary = True

0 commit comments

Comments
 (0)