Skip to content

Commit

Permalink
ui: drop unneeded int conversion in run_hang
Browse files Browse the repository at this point in the history
The method `UserInterface.run_hang` requires `pid` to be of type `int`.
  • Loading branch information
bdrung committed Mar 10, 2025
1 parent e18ec92 commit 312cdcf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apport/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,12 +587,12 @@ def run_hang(self, pid: int) -> bool:
self.cur_package = apport.fileutils.find_file_package(path)
self.report.add_os_info()
allowed_to_report = apport.fileutils.allowed_to_report()
response = self.ui_present_report_details(allowed_to_report, modal_for=int(pid))
response = self.ui_present_report_details(allowed_to_report, modal_for=pid)

Check warning on line 590 in apport/ui.py

View check run for this annotation

Codecov / codecov/patch

apport/ui.py#L590

Added line #L590 was not covered by tests
if response.report:
apport.fileutils.mark_hanging_process(self.report, pid)
os.kill(int(pid), signal.SIGABRT)
os.kill(pid, signal.SIGABRT)

Check warning on line 593 in apport/ui.py

View check run for this annotation

Codecov / codecov/patch

apport/ui.py#L593

Added line #L593 was not covered by tests
else:
os.kill(int(pid), signal.SIGKILL)
os.kill(pid, signal.SIGKILL)

Check warning on line 595 in apport/ui.py

View check run for this annotation

Codecov / codecov/patch

apport/ui.py#L595

Added line #L595 was not covered by tests

if response.restart:
self.wait_for_pid(pid)
Expand Down

0 comments on commit 312cdcf

Please sign in to comment.