summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-02-28 11:27:04 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2012-02-28 11:27:04 -0500
commit6aeeebeb8a1401b010347bbae8373d0422ee8ba3 (patch)
tree16a98288022900d8ecd585291215325eea0a650c
parent53b9cccf73a7655191186fcc9b721f7a448255c0 (diff)
downloadalembic-6aeeebeb8a1401b010347bbae8373d0422ee8ba3.tar.gz
- [bug] Fixed inappropriate direct call to
util.err() and therefore sys.exit() when Config failed to locate the config file within library usage. [#35]
-rw-r--r--CHANGES6
-rw-r--r--alembic/config.py2
2 files changed, 7 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 6efa997..f7b049d 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 dd24846..998bb85 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):