]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
- [bug] Fixed inappropriate direct call to
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 28 Feb 2012 16:27:04 +0000 (11:27 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 28 Feb 2012 16:27:04 +0000 (11:27 -0500)
  util.err() and therefore sys.exit()
  when Config failed to locate the
  config file within library usage.
  [#35]

CHANGES
alembic/config.py

diff --git a/CHANGES b/CHANGES
index 6efa99745e15ba01166da9a93c37ac2e570f8ea9..f7b049dc8f1ae915eb2df7df75991819f1c171fe 100644 (file)
--- 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.
index dd248463254a3a828e8a19bf69c8843ab688fe6e..998bb85475c19355b78ec4f7e1d4529102631bd1 100644 (file)
@@ -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):