Skip to content

Commit 11ed934

Browse files
committed
Do some refactoring
1 parent 23a37aa commit 11ed934

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

seleniumbase/plugins/pytest_plugin.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1972,7 +1972,10 @@ def pytest_terminal_summary(terminalreporter):
19721972
def _perform_pytest_unconfigure_():
19731973
from seleniumbase.core import proxy_helper
19741974

1975-
if not sb_config.multi_proxy:
1975+
if (
1976+
(hasattr(sb_config, "multi_proxy") and not sb_config.multi_proxy)
1977+
or not hasattr(sb_config, "multi_proxy")
1978+
):
19761979
proxy_helper.remove_proxy_zip_if_present()
19771980
if hasattr(sb_config, "reuse_session") and sb_config.reuse_session:
19781981
# Close the shared browser session

seleniumbase/plugins/selenium_plugin.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,10 @@ def beforeTest(self, test):
12251225

12261226
def finalize(self, result):
12271227
"""This runs after all tests have completed with nosetests."""
1228-
if not sb_config.multi_proxy:
1228+
if (
1229+
(hasattr(sb_config, "multi_proxy") and not sb_config.multi_proxy)
1230+
or not hasattr(sb_config, "multi_proxy")
1231+
):
12291232
proxy_helper.remove_proxy_zip_if_present()
12301233

12311234
def afterTest(self, test):

0 commit comments

Comments
 (0)