From 97392926fe5b7a9e95da846014fb3a4d9b1d239a Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 20 Jan 2012 13:42:13 -0500 Subject: [PATCH] - [bug] fix the config.main() function to honor the arguments passed, remove no longer used "scripts/alembic" as setuptools creates this for us. [#22] --- CHANGES | 7 +++++++ alembic/__init__.py | 2 +- alembic/config.py | 3 ++- scripts/alembic | 8 -------- 4 files changed, 10 insertions(+), 10 deletions(-) delete mode 100755 scripts/alembic diff --git a/CHANGES b/CHANGES index 0b702849..c34c8bc7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,10 @@ +0.1.2 +===== +- [bug] fix the config.main() function to honor + the arguments passed, remove no longer used + "scripts/alembic" as setuptools creates this + for us. [#22] + 0.1.1 ===== - [bug] Clean up file write operations so that diff --git a/alembic/__init__.py b/alembic/__init__.py index 1ed8a203..18984e33 100644 --- a/alembic/__init__.py +++ b/alembic/__init__.py @@ -1,6 +1,6 @@ from os import path -__version__ = '0.1.1' +__version__ = '0.1.2' package_dir = path.abspath(path.dirname(__file__)) diff --git a/alembic/config.py b/alembic/config.py index 79eb42d4..d48df0fb 100644 --- a/alembic/config.py +++ b/alembic/config.py @@ -114,6 +114,7 @@ class Config(object): """ return self.get_section_option(self.config_ini_section, name, default) + def main(argv=None, **kwargs): """The console runner function for Alembic.""" @@ -184,7 +185,7 @@ def main(argv=None, **kwargs): add_options(subparser, positional, kwarg) subparser.set_defaults(cmd=(fn, positional, kwarg)) - options = parser.parse_args() + options = parser.parse_args(argv) fn, positional, kwarg = options.cmd diff --git a/scripts/alembic b/scripts/alembic deleted file mode 100755 index 5a76304c..00000000 --- a/scripts/alembic +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python - -from alembic.config import main -import sys - -if __name__ == "__main__": - main(sys.argv) - -- 2.47.2