36 lines
1.4 KiB
Diff
36 lines
1.4 KiB
Diff
From 1b6beff15bf6e5c23feb74ab5bc16ea4c526597b Mon Sep 17 00:00:00 2001
|
|
From: Petr Stodulka <pstodulk@redhat.com>
|
|
Date: Mon, 4 May 2026 14:46:05 +0200
|
|
Subject: [PATCH 068/108] dnflibs: introduce DNFError exception
|
|
|
|
This is generic exception used for all DNF related errors raised
|
|
in dnflibs libraries. IOW, all exceptions introduced in these libraries
|
|
are based on DNFError, so if wanted, it's possible to catch a DNFError
|
|
exception in calling functions instead of listing each possible DNF
|
|
exception separately.
|
|
|
|
Signed-off-by: Petr Stodulka <pstodulk@redhat.com>
|
|
---
|
|
repos/system_upgrade/common/libraries/dnflibs/__init__.py | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/repos/system_upgrade/common/libraries/dnflibs/__init__.py b/repos/system_upgrade/common/libraries/dnflibs/__init__.py
|
|
index d94e4b4c..1aef3295 100644
|
|
--- a/repos/system_upgrade/common/libraries/dnflibs/__init__.py
|
|
+++ b/repos/system_upgrade/common/libraries/dnflibs/__init__.py
|
|
@@ -6,3 +6,11 @@ This package consolidates DNF functionality previously scattered across:
|
|
- leapp.libraries.common.dnfplugin -> dnflibs.dnfplugin
|
|
- leapp.libraries.common.module -> dnflibs.dnfmodule
|
|
"""
|
|
+
|
|
+from leapp.exceptions import StopActorExecutionError
|
|
+
|
|
+
|
|
+class DNFError(StopActorExecutionError):
|
|
+ """
|
|
+ Generic exception inherited by all DNF errors raised in dnflibs libraries.
|
|
+ """
|
|
--
|
|
2.54.0
|
|
|