mirror of
https://github.com/bec-project/ophyd_devices.git
synced 2026-02-20 17:28:42 +01:00
fix: only connect if specified
This commit is contained in:
@@ -202,7 +202,7 @@ class StaticDeviceTest:
|
|||||||
assert isinstance(obj.describe_configuration(), dict)
|
assert isinstance(obj.describe_configuration(), dict)
|
||||||
assert isinstance(obj.hints, dict)
|
assert isinstance(obj.hints, dict)
|
||||||
|
|
||||||
def validate_schema(self, name: str, conf: dict) -> None:
|
def validate_schema(self, name: str, conf: dict) -> int:
|
||||||
"""
|
"""
|
||||||
Validate the device config against the BEC device model
|
Validate the device config against the BEC device model
|
||||||
|
|
||||||
@@ -312,13 +312,10 @@ class StaticDeviceTest:
|
|||||||
try:
|
try:
|
||||||
return_val += self.validate_schema(name, conf)
|
return_val += self.validate_schema(name, conf)
|
||||||
return_val += self.check_device_classes(name, conf)
|
return_val += self.check_device_classes(name, conf)
|
||||||
if connect:
|
if connect and device_manager is not None:
|
||||||
return_val += self.connect_device(name, conf)
|
return_val += self.connect_device(name, conf)
|
||||||
self.validate_schema(name, conf)
|
self.validate_schema(name, conf)
|
||||||
self.check_device_classes(name, conf)
|
self.check_device_classes(name, conf)
|
||||||
if device_manager is not None:
|
|
||||||
self.connect_device(name, conf)
|
|
||||||
|
|
||||||
if return_val == 0:
|
if return_val == 0:
|
||||||
status = True
|
status = True
|
||||||
self.print_and_write(f"{name} is OK")
|
self.print_and_write(f"{name} is OK")
|
||||||
|
|||||||
Reference in New Issue
Block a user