data_cloud: check if cloud section exists

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2017-06-11 22:49:15 +03:00
parent b502691b0e
commit 8253f449ca
+3
View File
@@ -348,6 +348,9 @@ class DataCloud(object):
if self.typ not in self.CLOUD_MAP.keys():
raise ConfigError('Wrong cloud type %s specified' % self.typ)
if self.typ not in self._config.keys():
raise ConfigError('Can\'t find cloud section \'[%s]\' in config' % self.typ)
self._cloud = self.CLOUD_MAP[self.typ](self._settings, self._config, self._config[self.typ])
self.sanity_check()