yash-dk / TorToolkit-Telegram

Most versatile Telegram torrent, direct-link, mega, and youtube-dl bot. Uploads to various cloud storage like Gdrive, Mega, Telegram, etc.
GNU General Public License v3.0
676 stars 1.56k forks source link

fix: variable be overridden by non-existent env #74

Closed mountlin closed 3 years ago

mountlin commented 3 years ago

When a Boolean environment variable does not exist, the variable value is set to None instead of maintaining the original constant value, which should be wrong. For example, if LEECH_ENABLED is set to True in ExecVarsSample.py, but the environment variable is not defined, a strange warning will eventually be output: ERROR MainThread tortoolkit.core.varholdern The variable was not found in either the constants, environment or database. Variable is :- LEECH_ENABLED

yash-dk commented 3 years ago

Thanks for the PR can you do the PR on the beta branch

mountlin commented 3 years ago

Thanks for the PR can you do the PR on the beta branch

Okay, Done.