Commit 3f349dc
committed
fix: Prevent caching unpicklable trait objects
DeviceFeaturesTrait and NetworkInfoTrait were storing entire trait objects
(including unpicklable _rpc_channel) in the cache, causing pickle errors
during cache.flush().
Now creates pure data-only instances for caching, excluding runtime objects
like _rpc_channel, _device_cache, and _nickname.
Fixes: AttributeError when flushing cache - "Can't pickle local object
'V1Channel.rpc_channel.<locals>.rpc_strategies_cb'"1 parent c843ab6 commit 3f349dc
File tree
2 files changed
+11
-2
lines changed- roborock/devices/traits/v1
2 files changed
+11
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
| |||
0 commit comments