Closed rkingsbury closed 1 year ago
This is a very nice catch and a lesson I keep forgetting. It should have been a string comparison to 'true'
.
A similar problem may apply to PYMONGOIM__MONGO_VERSION
which I believe is parsed to a string instead of a numeric value
A similar problem may apply to
PYMONGOIM__MONGO_VERSION
which I believe is parsed to a string instead of a numeric value
For this str
is fine, because this value is being parsed into SemVer
down the line, hence, value provided can include dots.
Describe the bug
Setting
PYMONGOIM__USE_LOCAL_MONGOD
to eitherTrue
orFalse
results in the log messageThis occurs because the variable, whether set to
True
orFalse
, is parsed as a string byos.environ.get
at this line, leading to the unexpected behavior that any attempt by the user to set this variable will result in it being evaluated toTrue
.To Reproduce