mirror of https://github.com/m-labs/artiq.git
environment/get_device_db: raise ValueError when device manager not present
This commit is contained in:
parent
398468410f
commit
9b4a04b307
|
@ -229,6 +229,8 @@ class HasEnvironment:
|
||||||
"""Returns the full contents of the device database."""
|
"""Returns the full contents of the device database."""
|
||||||
if self.__parent is not None:
|
if self.__parent is not None:
|
||||||
return self.__parent.get_device_db()
|
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()
|
return self.__device_mgr.get_device_db()
|
||||||
|
|
||||||
def get_device(self, key):
|
def get_device(self, key):
|
||||||
|
|
Loading…
Reference in New Issue