Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Commit 9a70dda

Browse files
committed
fix prepare_profiles
1 parent 54c90cb commit 9a70dda

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/browser.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,11 @@ def _get_target_profile(self) -> str:
100100
return self.profile_dir()
101101

102102
def prepare_profile(self):
103+
if not self.use_user_data_dir:
104+
return
105+
103106
target_profile = self._get_target_profile()
104-
if os.path.exists(target_profile) and self.use_user_data_dir:
107+
if os.path.exists(target_profile):
105108
shutil.rmtree(target_profile)
106109
if not os.path.exists(self._get_source_profile()):
107110
raise RuntimeError('Can\'t find source profile')

0 commit comments

Comments
 (0)