Blame SOURCES/0015-iscsi-Replace-all-log_exception_info-calls-with-log.patch

585101
From 23b7573557e69d9b4dccdd6d52e82b82d8dba115 Mon Sep 17 00:00:00 2001
585101
From: Vojtech Trefny <vtrefny@redhat.com>
585101
Date: Wed, 1 Dec 2021 16:28:15 +0100
585101
Subject: [PATCH] iscsi: Replace all log_exception_info calls with log.info
585101
585101
We don't get any useful information from the exception, it's
585101
always the same traceback from a failed DBus call and we only use
585101
these when a called failed because firmware ISCSI is not supported.
585101
The resulting log message also looks like a failure with the
585101
traceback logged and not just as a debug information.
585101
585101
Resolves: rhbz#2028134
585101
---
585101
 blivet/iscsi.py | 9 ++++-----
585101
 1 file changed, 4 insertions(+), 5 deletions(-)
585101
585101
diff --git a/blivet/iscsi.py b/blivet/iscsi.py
585101
index 5ee2082b..bc77ca62 100644
585101
--- a/blivet/iscsi.py
585101
+++ b/blivet/iscsi.py
585101
@@ -22,7 +22,6 @@ from . import udev
585101
 from . import util
585101
 from .flags import flags
585101
 from .i18n import _
585101
-from .storage_log import log_exception_info
585101
 from . import safe_dbus
585101
 import os
585101
 import re
585101
@@ -277,8 +276,8 @@ class iSCSI(object):
585101
                                           'org.freedesktop.DBus.ObjectManager',
585101
                                           'GetManagedObjects',
585101
                                           None)[0]
585101
-        except safe_dbus.DBusCallError:
585101
-            log_exception_info(log.info, "iscsi: Failed to get active sessions.")
585101
+        except safe_dbus.DBusCallError as e:
585101
+            log.info("iscsi: Failed to get active sessions: %s", str(e))
585101
             return []
585101
 
585101
         sessions = (obj for obj in objects.keys() if re.match(r'.*/iscsi/session[0-9]+$', obj))
585101
@@ -302,8 +301,8 @@ class iSCSI(object):
585101
         args = GLib.Variant("(a{sv})", ([], ))
585101
         try:
585101
             found_nodes, _n_nodes = self._call_initiator_method("DiscoverFirmware", args)
585101
-        except safe_dbus.DBusCallError:
585101
-            log_exception_info(log.info, "iscsi: No IBFT info found.")
585101
+        except safe_dbus.DBusCallError as e:
585101
+            log.info("iscsi: No IBFT info found: %s", str(e))
585101
             # an exception here means there is no ibft firmware, just return
585101
             return
585101
 
585101
-- 
585101
2.31.1
585101