Closed ruben-janssens closed 10 months ago
hi -
cmd_options is only the command line options. if you dont have a command line then nothing there will be set. When calling programmatically, cmd_opts
is None, so there will not be anything to read.
to get help debugging your program including this "stuck" state, please open a discussion with more detail how you are calling these commands.
Describe the bug When attempting to programmatically generate a new revision of a database and placing a process_revision_directives function in the context in
env.py
does not setcontext.cmd_options.autogenerate
toTrue
. In addition to this it does also not throw any error readable error. The program just gets in a 'stuck'.Expected behavior Throw an error so we know what the problem is or add more documentation regarding the
command
module.To Reproduce Use the command module and call the revision command with
autogenerate
set toTrue
. In yourenv.py
do something withconfig.cmd_opts.autogenerate
. The application will error and you can catch it with a try except but no readable error is given.Versions.