Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
nexedi
slapos
Commits
2e6ad002
Commit
2e6ad002
authored
13 years ago
by
Arnaud Fontaine
Browse files
Options
Download
Email Patches
Plain Diff
Check whether key_file and cert_file are defined for https.
parent
2a985170
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
slapos/console.py
slapos/console.py
+7
-2
No files found.
slapos/console.py
View file @
2e6ad002
...
...
@@ -86,8 +86,13 @@ class Config:
for
key
in
configuration_dict
:
setattr
(
self
,
key
,
configuration_dict
[
key
])
if
not
self
.
master_url
:
raise
ValueError
(
'master_url is required.'
)
master_url
=
getattr
(
self
,
'master_url'
,
None
)
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
):
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment