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] ui_session: return airgun session as a context manager #15155

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
8 changes: 3 additions & 5 deletions robottelo/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -1871,17 +1871,15 @@ def get_caller():
return None

try:
ui_session = Session(
with Session(
session_name=testname or get_caller(),
user=user or settings.server.admin_username,
password=password or settings.server.admin_password,
url=url,
hostname=self.hostname,
login=login,
)
yield ui_session
except Exception:
raise
) as ui_session:
yield ui_session
finally:
if self.record_property is not None and settings.ui.record_video:
video_url = settings.ui.grid_url.replace(
Expand Down
Loading