From: Mike Bayer Date: Tue, 28 Feb 2012 16:27:04 +0000 (-0500) Subject: - [bug] Fixed inappropriate direct call to X-Git-Tag: rel_0_2_2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6aeeebeb8a1401b010347bbae8373d0422ee8ba3;p=thirdparty%2Fsqlalchemy%2Falembic.git - [bug] Fixed inappropriate direct call to util.err() and therefore sys.exit() when Config failed to locate the config file within library usage. [#35] --- diff --git a/CHANGES b/CHANGES index 6efa9974..f7b049dc 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,12 @@ - [feature] Informative error message when op.XYZ directives are invoked at module import time. +- [bug] Fixed inappropriate direct call to + util.err() and therefore sys.exit() + when Config failed to locate the + config file within library usage. + [#35] + - [bug] implement 'tablename' parameter on drop_index() as this is needed by some backends. diff --git a/alembic/config.py b/alembic/config.py index dd248463..998bb854 100644 --- a/alembic/config.py +++ b/alembic/config.py @@ -128,7 +128,7 @@ class Config(object): """ if not self.file_config.has_section(section): - util.err("No config file %r found, or file has no " + raise util.CommandError("No config file %r found, or file has no " "'[%s]' section" % (self.config_file_name, section)) if self.file_config.has_option(section, name):