diff --git a/netbox_agent/datacenter.py b/netbox_agent/datacenter.py index 84b7ead..436d404 100644 --- a/netbox_agent/datacenter.py +++ b/netbox_agent/datacenter.py @@ -39,4 +39,6 @@ class Datacenter(): raise ImportError("Driver {} doesn't exists".format(self.driver)) def get(self): + if not hasattr(self.driver, 'get'): + raise Exception("Your driver {} doesn't have a get() function, please fix it".format(self.driver)) return getattr(self.driver, 'get')(self.driver_value, DATACENTER_LOCATION_REGEX)