Skip to content
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
22 changes: 18 additions & 4 deletions repos/system_upgrade/common/libraries/dnfconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,16 @@ def _set_excluded_pkgs(context, pkglist, disable_plugins):

try:
context.call(cmd)
except CalledProcessError:
except CalledProcessError as e:
api.current_logger().error('Cannot set the dnf configuration')
raise
raise StopActorExecutionError(
message='Cannot set the DNF configuration with the command: {}'.format(cmd),
details={
'details': 'An exception raised: {}'.format(str(e)),
'stdout': e.stdout,
'stderr': e.stderr
}
)
api.current_logger().debug('The DNF configuration has been updated to exclude leapp packages.')


Expand Down Expand Up @@ -147,7 +154,14 @@ def _set_repository_state(context, repo_id, new_state):

try:
context.call(cmd)
except CalledProcessError:
except CalledProcessError as e:
api.current_logger().error('Cannot set the dnf configuration')
raise
raise StopActorExecutionError(
message='Cannot set the DNF configuration with the command: {}'.format(cmd),
details={
'details': 'An exception raised: {}'.format(str(e)),
'stdout': e.stdout,
'stderr': e.stderr
}
)
api.current_logger().debug('Repository {} has been {}'.format(repo_id, new_state))
Loading