check for get() function
This commit is contained in:
parent
0e0ceb7811
commit
87939d3e35
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue