Merge pull request #954 from mwhudson/no-apport-hooks-in-dry-run-mode

do not run most apport hooks in dry-run mode
This commit is contained in:
Michael Hudson-Doyle 2021-05-14 04:31:14 +12:00 committed by GitHub
commit 3cbcddb651
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -135,8 +135,9 @@ class ErrorReport(metaclass=urwid.MetaSignals):
# Add basic info to report.
self.pr.add_proc_info()
self.pr.add_os_info()
self.pr.add_hooks_info(None)
apport.hookutils.attach_hardware(self.pr)
if not self.reporter.dry_run:
self.pr.add_hooks_info(None)
apport.hookutils.attach_hardware(self.pr)
# Because apport-cli will in general be run on a different
# machine, we make some slightly obscure alterations to the report
# to make this go better.