Commit 2ace980
Kristoffel Pirard
prior: fix AttributeError for bad connections
When constructing a ProScanIII object on a port that does
not contain a prior controller, the _devices member is not
defined.
This causes the __del__ operation of the object to fail, because
it will end up in the base class' __del__, which requires the
`devices` property, which requires the `_devices` member to be present.
Conceptually, the base class requires the implementation to be
a valid object. One may also argue that the object is not allowed
to be construted at all if not connected to a proper device; that
would be an alternative fix.1 parent 2c282da commit 2ace980
1 file changed
+9
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
215 | | - | |
216 | 214 | | |
217 | 215 | | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
223 | 225 | | |
224 | 226 | | |
225 | 227 | | |
| |||
0 commit comments