From 9b4a04b30792eb5406e63970c51bb7e88aedc5a5 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 16 Apr 2016 19:38:46 +0800 Subject: [PATCH] environment/get_device_db: raise ValueError when device manager not present --- artiq/language/environment.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/artiq/language/environment.py b/artiq/language/environment.py index 35654aab4..0adf299be 100644 --- a/artiq/language/environment.py +++ b/artiq/language/environment.py @@ -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):