qizhiyi / sqlalchemy-migrate

Automatically exported from code.google.com/p/sqlalchemy-migrate
MIT License
0 stars 0 forks source link

migrate.versioning.shell.main() test for argv #92

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The main() function currently uses the following code to switch between the 
argv passed versus sys.argv:

    argv = argv or list(sys.argv[1:])

This should be:

    argv = argv if argv is not None else list(sys.argv[1:])

So that when an empty list is passed (argv=[]), it will consider no command to 
have been selected, as opposed to whatever might be in sys.argv.

I ran across this while integrating the migrate command into a parent parser.

Original issue reported on code.google.com by elsdoer...@gmail.com on 24 Aug 2010 at 12:12

GoogleCodeExporter commented 8 years ago
Thanks, fixed in 38dca475c553

Original comment by iElect...@gmail.com on 12 Sep 2010 at 11:29