修复小bug

This commit is contained in:
g1879 2020-10-15 16:53:16 +08:00
parent 792c05141b
commit 5481cd8ae4

View File

@ -33,7 +33,8 @@ def set_paths(driver_path: str = None,
om = OptionsManager()
def format_path(path: str) -> str:
return path.replace('/', '\\')
if isinstance(path, str):
return path.replace('/', '\\')
if driver_path is not None:
om.set_item('paths', 'chromedriver_path', format_path(driver_path))