Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.14.z] browser teardown fix at session exit #1415

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions airgun/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def __exit__(self, exc_type, exc_value, traceback):
not risen not to shadow real session result.
"""
if self.browser is None:
# browser was never started, don't do anything
# browser hasn't been started or was already closed, don't do anything
return
LOGGER.info('Stopping UI session %r for user %r', self.name, self._user)
passed = True if exc_type is None else False
Expand All @@ -240,7 +240,7 @@ def __exit__(self, exc_type, exc_value, traceback):
except Exception as err: # - TODO: fix bare except
LOGGER.exception(err)
finally:
self._factory.finalize(passed)
self.browser = self._factory.finalize(passed)

def _open(self, entity):
"""Initializes requested entity. If this is first time session
Expand Down
Loading