Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Conversation

@nk9
Copy link
Contributor

@nk9 nk9 commented Aug 27, 2019

Using dict.get('key') or True means that key can never be False! And
in other cases, it's just clearer and more compact to use the default
parameter.

I ran into this when I was trying to disable TLS so I could use the Python SMTPd for debugging mail. TLS was always on, even when I set MAIL_USE_TLS= in the config.env file. I eventually discovered that it was because that was turning into a True value after processing the file.

Note that the behavior has also changed for SSL_DISABLE, which is being compared to the string 'True'. If it was left blank as SSL_DISABLE=, then it would turn into True. Now it will register an empty string in the .env file as False.

nk9 added 2 commits August 27, 2019 22:57
Using `dict.get('key') or True` means that key can never be False! And in other cases, it's just clearer and more compact to use the default parameter.
@nk9
Copy link
Contributor Author

nk9 commented Aug 28, 2019

Checks green now. :-)

@abhisuri97
Copy link
Contributor

Looks good to me. Merging :)

@abhisuri97 abhisuri97 merged commit 8ccc454 into hack4impact:master Aug 28, 2019
@nk9 nk9 deleted the config-changes branch August 28, 2019 15:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants