python-rtslib/0002-default_dbroot.patch
Maurizio Lombardi c6876f4ede rtslib: disable the unsupported fabrics
Resolves: #1942057

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
2021-04-12 10:26:18 +02:00

32 lines
1.5 KiB
Diff

diff --git a/rtslib/root.py b/rtslib/root.py
index 2c5cf43..34bc57d 100644
--- a/rtslib/root.py
+++ b/rtslib/root.py
@@ -166,21 +166,21 @@ class RTSRoot(CFSNode):
self._dbroot = self._default_dbroot
return
self._dbroot = fread(dbroot_path)
- if self._dbroot != self._preferred_dbroot:
+ if self._dbroot != self._default_dbroot:
if len(FabricModule.list_registered_drivers()) != 0:
# Writing to dbroot_path after drivers have been registered will make the kernel emit this error:
# db_root: cannot be changed: target drivers registered
from warnings import warn
warn("Cannot set dbroot to {}. Target drivers have already been registered."
- .format(self._preferred_dbroot))
+ .format(self._default_dbroot))
return
try:
- fwrite(dbroot_path, self._preferred_dbroot+"\n")
+ fwrite(dbroot_path, self._default_dbroot+"\n")
except:
- if not os.path.isdir(self._preferred_dbroot):
+ if not os.path.isdir(self._default_dbroot):
raise RTSLibError("Cannot set dbroot to {}. Please check if this directory exists."
- .format(self._preferred_dbroot))
+ .format(self._default_dbroot))
self._dbroot = fread(dbroot_path)
def _get_dbroot(self):