Skip to content

Commit

Permalink
Migrate the %onerror and %traceback script
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkankovsky committed Aug 20, 2024
1 parent a3fcf1b commit acd29b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pyanaconda/exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,11 @@ def _run_kickstart_scripts(self, _dump_info):
try:
sync_run_task(onerror_task_proxy)
sync_run_task(traceback_task_proxy)
# pylint: disable=bare-except
# ruff: noqa: E722
except:
pass


def runDebug(self, exc_info):
if conf.system.can_switch_tty and self._intf_tty_num != 1:
util.vtActivate(1)
Expand Down
4 changes: 2 additions & 2 deletions pyanaconda/modules/runtime/kickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
# License and may only be used or replicated with the express permission of
# Red Hat, Inc.
#
from pykickstart.sections import PreInstallScriptSection, PostScriptSection
from pykickstart.sections import (PreInstallScriptSection,
PostScriptSection, TracebackScriptSection, OnErrorScriptSection)

from pyanaconda.core.kickstart import KickstartSpecification, commands as COMMANDS
from pyanaconda.kickstart import AnacondaKSScript
Expand Down Expand Up @@ -46,7 +47,6 @@ class RuntimeKickstartSpecification(KickstartSpecification):
}

sections = {
"pre": lambda handler: PreScriptSection(handler, dataObj=AnacondaKSScript),
"pre-install": lambda handler: PreInstallScriptSection(handler, dataObj=AnacondaKSScript),
"post": lambda handler: PostScriptSection(handler, dataObj=AnacondaKSScript),
"onerror": lambda handler: OnErrorScriptSection(handler, dataObj=AnacondaKSScript),
Expand Down

0 comments on commit acd29b0

Please sign in to comment.