python-rtslib/SOURCES/0002-default_dbroot.patch
2021-09-10 03:17:12 +00:00

23 lines
994 B
Diff

diff --git a/rtslib/root.py b/rtslib/root.py
index b83d7ee..49c4dfc 100644
--- a/rtslib/root.py
+++ b/rtslib/root.py
@@ -166,13 +166,13 @@ 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:
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):