Commit 2e6ad002 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Check whether key_file and cert_file are defined for https.

parent 2a985170
...@@ -86,8 +86,13 @@ class Config: ...@@ -86,8 +86,13 @@ class Config:
for key in configuration_dict: for key in configuration_dict:
setattr(self, key, configuration_dict[key]) setattr(self, key, configuration_dict[key])
if not self.master_url: master_url = getattr(self, 'master_url', None)
raise ValueError('master_url is required.') if not master_url:
raise ValueError("No option 'master_url'")
elif master_url.startswith('https') and \
not getattr(self, 'key_file', None) and \
not getattr(self, 'cert_file', None):
raise ValueError("No option 'key_file' and/or 'cert_file'")
def init(config): def init(config):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment