Skip to content

Commit

Permalink
Removed option.
Browse files Browse the repository at this point in the history
see #554
  • Loading branch information
tonioo committed May 16, 2024
1 parent 271add9 commit 917bd73
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
4 changes: 0 additions & 4 deletions modoboa_installer/config_dict_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ def is_email(user_input):
{
"name": "certificate",
"values": [
{
"option": "generate",
"default": "true",
},
{
"option": "type",
"default": "self-signed",
Expand Down
2 changes: 1 addition & 1 deletion modoboa_installer/scripts/nginx.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Nginx(base.Installer):

def get_template_context(self, app):
"""Additionnal variables."""
context = super(Nginx, self).get_template_context()
context = super().get_template_context()
context.update({
"app_instance_path": (
self.config.get(app, "instance_path")),
Expand Down
4 changes: 0 additions & 4 deletions modoboa_installer/ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,6 @@ def generate_cert(self):
def get_backend(config):
"""Return the appropriate backend."""
cert_type = config.get("certificate", "type")
condition = (not config.getboolean("certificate", "generate") and
cert_type != "manual")
if condition:
return None
if cert_type == "letsencrypt":
return LetsEncryptCertificate(config)
if cert_type == "manual":
Expand Down
4 changes: 2 additions & 2 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@ def main(input_args):
if is_config_file_available and outdate_config:
answer = utils.user_input("It seems that your config file is outdated. "
"Would you like to update it? (Y/n) ")
if answer.lower().startswith("y"):
if not answer or answer.lower().startswith("y"):
config_file_update_complete(utils.update_config(args.configfile))
if not args.stop_after_configfile_check:
answer = utils.user_input("Would you like to stop to review the updated config? (Y/n)")
if answer.lower().startswith("y"):
if not answer or answer.lower().startswith("y"):
return
else:
utils.error("You might encounter unexpected errors ! "
Expand Down

0 comments on commit 917bd73

Please sign in to comment.