fix: only get path once
This commit is contained in:
parent
361b99a265
commit
28060e8f25
|
|
@ -37,11 +37,11 @@ def read_ods(
|
||||||
"""
|
"""
|
||||||
path = file_or_path if isinstance(file_or_path, Path) else Path(file_or_path)
|
path = file_or_path if isinstance(file_or_path, Path) else Path(file_or_path)
|
||||||
if not path.is_file():
|
if not path.is_file():
|
||||||
raise FileNotFoundError(f"file {file_or_path} does not exist")
|
raise FileNotFoundError(f"file {path} does not exist")
|
||||||
backend = EXT_MAP.get(Path(file_or_path).suffix, ods)
|
backend = EXT_MAP.get(path.suffix, ods)
|
||||||
return algo.read_data(
|
return algo.read_data(
|
||||||
backend,
|
backend,
|
||||||
Path(file_or_path),
|
path,
|
||||||
sheet,
|
sheet,
|
||||||
headers=headers,
|
headers=headers,
|
||||||
columns=columns or [],
|
columns=columns or [],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue