add datacenter location awareness with pseudo-driver (cmd and file) #4
1 changed files with 3 additions and 1 deletions
|
@ -40,5 +40,7 @@ class Datacenter():
|
||||||
|
|
||||||
def get(self):
|
def get(self):
|
||||||
if not hasattr(self.driver, 'get'):
|
if not hasattr(self.driver, 'get'):
|
||||||
raise Exception("Your driver {} doesn't have a get() function, please fix it".format(self.driver))
|
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)
|
return getattr(self.driver, 'get')(self.driver_value, DATACENTER_LOCATION_REGEX)
|
||||||
![]() Fixed in last commit Fixed in last commit
|
|||||||
|
|
Loading…
Add table
Reference in a new issue
We should properly check if the module has a
get
method to output a proper error message if a custom driver is not compliant instead of an ugly stacktrace.