Commits

Mike Bayer committed 6aeeebe

- [bug] Fixed inappropriate direct call to
util.err() and therefore sys.exit()
when Config failed to locate the
config file within library usage.
[#35]

  • Participants
  • Parent commits 53b9ccc

Comments (0)

Files changed (2)

 - [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.

alembic/config.py

 
         """
         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):