From a4b247c19b690c2643097fdbec096470e635b4a0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 10 Jun 2023 11:27:37 +0200 Subject: Adding upstream version 2.2.2. Signed-off-by: Daniel Baumann --- staslib/trid.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'staslib') 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): -- cgit v1.2.3