Commit 7600cd6f authored by Wei Shoulin's avatar Wei Shoulin
Browse files

local file validate

parent aabe93dc
Pipeline #7703 failed with stages
in 0 seconds
......@@ -84,6 +84,8 @@ def write_file(local_file: Union[IO, str], **kwargs) -> Result:
Result: 操作的结果对象,包含操作是否成功以及相关的错误信息,成功返回数据对象。
"""
if local_file is None:
raise ValueError("local_file is required")
if isinstance(local_file, str):
if not os.path.exists(local_file):
raise FileNotFoundError(local_file)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment