Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 `abc.Controller` class requires the implementation to be a valid object. the `super().__init__` method may call any of the public base members, so we have to make sure they are valid before calling it. One may also argue that the object is not allowed to be constructed at all if not connected to a proper device; that would be an alternative fix.
- Loading branch information