From 71ee7bc980bcbe5b3ea9fefb5f1055ea11cd48a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Wed, 15 May 2019 10:19:51 +0200 Subject: [PATCH] Fix boolean configuration choices Since the ask_bool refactoring, boolean choices were no longer taken into account during interactive configuration. --- CHANGELOG.md | 4 ++++ tutor/config.py | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98148a7..fce6dfe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Latest + +- [Bugfix] Fix boolean configuration choices + ## 3.3.9 (2019-05-13) - [Improvement] Add `local exec` command for running commands inside existing containers diff --git a/tutor/config.py b/tutor/config.py index 1db4fc9..6b52a6e 100644 --- a/tutor/config.py +++ b/tutor/config.py @@ -260,7 +260,7 @@ def load_interactive(config): ask_bool( ( "Activate SSL/TLS certificates for HTTPS access? Important note:" - "this will NOT work in a development environment." + " this will NOT work in a development environment." ), "ACTIVATE_HTTPS", config, @@ -298,7 +298,9 @@ def ask(question, key, config): def ask_bool(question, key, config): - return click.confirm(fmt.question(question), prompt_suffix=" ", default=config[key]) + config[key] = click.confirm( + fmt.question(question), prompt_suffix=" ", default=config[key] + ) def ask_choice(question, key, config, choices):