summaryrefslogtreecommitdiffstats
path: root/staslib
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-10 09:26:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-10 09:27:49 +0000
commit50e0137673dc400aaab7da461bb3d12caf6a960b (patch)
tree656ca59665bc2071433c2f9cee61edfcfd2237c1 /staslib
parentReleasing debian version 2.2.1-2. (diff)
downloadnvme-stas-50e0137673dc400aaab7da461bb3d12caf6a960b.tar.xz
nvme-stas-50e0137673dc400aaab7da461bb3d12caf6a960b.zip
Merging upstream version 2.2.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'staslib')
-rw-r--r--staslib/trid.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/staslib/trid.py b/staslib/trid.py
index ea40b7d..d9a05ba 100644
--- a/staslib/trid.py
+++ b/staslib/trid.py
@@ -106,7 +106,12 @@ class TID: # pylint: disable=too-many-instance-attributes
'host-traddr': self.host_traddr,
'host-iface': self.host_iface,
}
- data.update(self._cfg)
+
+ # When migrating an old last known config, the "_cfg" member may
+ # not exist. Therefor retrive it with getattr() to avoid a crash.
+ cfg = getattr(self, '_cfg', None)
+ if cfg:
+ data.update(cfg)
return data
def __str__(self):