Skip to content

Commit

Permalink
squash: post-rebase fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
happz committed Jan 24, 2024
1 parent 953eed8 commit 2b58961
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
5 changes: 1 addition & 4 deletions tmt/checks/watchdog.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@
def render_report_path(invocation: 'TestInvocation') -> Path:
""" Render path to a watchdog report file from necessary components """

return invocation.data_path(
filename=REPORT_FILENAME,
create=True,
full=True)
return invocation.path / REPORT_FILENAME


def report_progress(
Expand Down
31 changes: 15 additions & 16 deletions tmt/steps/execute/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,22 +264,21 @@ def handle_reboot(self) -> bool:
pass

elif self.soft_reboot_requested:
if self.reboot_request_path.exists():
# Extract custom hints from the file, and reset it.
with open(self.reboot_request_path) as reboot_file:
reboot_data = json.loads(reboot_file.read())

if reboot_data.get('command'):
with suppress(TypeError):
reboot_command = ShellScript(reboot_data.get('command'))

try:
timeout = int(reboot_data.get('timeout'))
except ValueError:
timeout = None

os.remove(self.reboot_request_path)
self.guest.push(self.test_data_path)
# Extract custom hints from the file, and reset it.
with open(self.reboot_request_path) as reboot_file:
reboot_data = json.loads(reboot_file.read())

if reboot_data.get('command'):
with suppress(TypeError):
reboot_command = ShellScript(reboot_data.get('command'))

try:
timeout = int(reboot_data.get('timeout'))
except ValueError:
timeout = None

os.remove(self.reboot_request_path)
self.guest.push(self.test_data_path)

rebooted = False

Expand Down

0 comments on commit 2b58961

Please sign in to comment.