From fcd3bedb008bfabcf34ebf0655cb5cd27ac61389 Mon Sep 17 00:00:00 2001 From: arifer612 <46054733+arifer612@users.noreply.github.com> Date: Wed, 11 Nov 2020 21:33:13 +0800 Subject: [PATCH] Changed final print statement to reflect changes Arguments for the `disable` command are either `{0, false}`, or `{1, true}`. However, only if the argument is `1` will the print statement print "Howdy has been disabled". It should, by right, also show if the argument was `true`. To fix it, I noticed that the 2 possible sets of arguments fall into either of 2 groups characterised by the variable `out_value`. I thus suggest that the variable be used in the conditional for the final print statement. --- src/cli/disable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/disable.py b/src/cli/disable.py index 5f15d5b..971015d 100644 --- a/src/cli/disable.py +++ b/src/cli/disable.py @@ -39,7 +39,7 @@ for line in fileinput.input([config_path], inplace=1): print(line.replace("disabled = " + config.get("core", "disabled"), "disabled = " + out_value), end="") # Print what we just did -if builtins.howdy_args.argument == "1": +if out_value == "true": print("Howdy has been disabled") else: print("Howdy has been enabled")