Skip to content

Commit 8fb2414

Browse files
committed
ucloud: Fix set/get attr to work with MicroPython.
1 parent 57cabc1 commit 8fb2414

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arduino_iot_cloud/ucloud.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ def value(self, value):
113113
self._value = value
114114

115115
def __getattr__(self, attr):
116-
if isinstance(super().__dict__.get("_value", None), dict) and attr in super().value:
116+
if isinstance(getattr(super(), "_value", None), dict) and attr in super().value:
117117
return super().value[attr].value
118118
raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{attr}'")
119119

120120
def __setattr__(self, name, value):
121-
if isinstance(super().__dict__.get("_value", None), dict) and name in super().value:
121+
if isinstance(getattr(super(), "_value", None), dict) and name in super().value:
122122
self.value[name].value = value
123123
else:
124124
super().__setattr__(name, value)

0 commit comments

Comments
 (0)