ntprop 0.2.2__tar.gz → 0.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -35,7 +35,10 @@ class NTProperty:
|
|
|
35
35
|
self.value_listener = NTProperty.nt_instance.addListener(self.sub, ntcore.EventFlags.kValueAll, update)
|
|
36
36
|
|
|
37
37
|
def __del__(self):
|
|
38
|
-
NTProperty.nt_instance
|
|
38
|
+
if NTProperty.nt_instance is None:
|
|
39
|
+
# Shouldn't every happen, but just to be safe
|
|
40
|
+
return
|
|
41
|
+
NTProperty.nt_instance.removeListener(self.value_listener)
|
|
39
42
|
self.sub.close()
|
|
40
43
|
if self.pub is not None:
|
|
41
44
|
self.pub.close()
|
|
@@ -66,7 +69,7 @@ class NTPropertyHost:
|
|
|
66
69
|
if not hasattr(self, "_ntdict"):
|
|
67
70
|
self._ntdict = {}
|
|
68
71
|
self._ntdict[value.path] = value
|
|
69
|
-
super().__setattr__(name, value)
|
|
72
|
+
return super().__setattr__(name, value)
|
|
70
73
|
elif isinstance(self.__dict__.get(name), NTProperty):
|
|
71
74
|
self.__dict__[name].set(value)
|
|
72
75
|
return value
|
|
File without changes
|
|
File without changes
|