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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ntprop
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: A way to create transparent NetworkTables variables
5
5
  License: MIT
6
6
  Author: Kellen Watt
@@ -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.remove_listener(self.value_listener)
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ntprop"
3
- version = "0.2.2"
3
+ version = "0.2.3"
4
4
  description = "A way to create transparent NetworkTables variables"
5
5
  authors = [
6
6
  {name = "Kellen Watt",email = "kellen@wattsoft.dev"}
File without changes
File without changes