diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-07-28 06:48:16 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-07-28 06:48:16 -0400 |
commit | 56bdf6c98fb3a5a4a6bb481bf108b08a6cd83616 (patch) | |
tree | fc8e49743c067fad85e133d5c9ec3aada21a7855 /alembic/script.py | |
parent | 8a282878eb15b5d56c63e056d63f67057c07414c (diff) | |
download | alembic-56bdf6c98fb3a5a4a6bb481bf108b08a6cd83616.tar.gz |
- [bug] 'alembic' command reports an informative
error message when the configuration is missing
the 'script_directory' key. #63
Diffstat (limited to 'alembic/script.py')
-rw-r--r-- | alembic/script.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/alembic/script.py b/alembic/script.py index efbde8d..286a3d4 100644 --- a/alembic/script.py +++ b/alembic/script.py @@ -52,10 +52,12 @@ class ScriptDirectory(object): present. """ + script_location = config.get_main_option('script_location') + if script_location is None: + raise util.CommandError("No 'script_location' key " + "found in configuration.") return ScriptDirectory( - util.coerce_resource_to_filename( - config.get_main_option('script_location') - ), + util.coerce_resource_to_filename(script_location), file_template = config.get_main_option( 'file_template', _default_file_template) |