From 5481cd8ae4c4827a70129c535a954c91a80d8db9 Mon Sep 17 00:00:00 2001 From: g1879 Date: Thu, 15 Oct 2020 16:53:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B0=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DrissionPage/easy_set.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DrissionPage/easy_set.py b/DrissionPage/easy_set.py index c24a385..f94afd3 100644 --- a/DrissionPage/easy_set.py +++ b/DrissionPage/easy_set.py @@ -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))