2
0
mirror of https://github.com/m-labs/artiq.git synced 2025-01-06 00:53:35 +08:00

environment/get_device_db: raise ValueError when device manager not present

This commit is contained in:
Sebastien Bourdeauducq 2016-04-16 19:38:46 +08:00
parent 398468410f
commit 9b4a04b307

View File

@ -229,6 +229,8 @@ class HasEnvironment:
"""Returns the full contents of the device database."""
if self.__parent is not None:
return self.__parent.get_device_db()
if self.__device_mgr is None:
raise ValueError("Device manager not present")
return self.__device_mgr.get_device_db()
def get_device(self, key):