[asterisk-commits] mjordan: branch 12 r414763 - /branches/12/contrib/ast-db-manage/cdr/env.py

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 28 12:43:42 CDT 2014


Author: mjordan
Date: Wed May 28 12:43:36 2014
New Revision: 414763

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=414763
Log:
ast-db-manage/cdr/env.py: Don't fail if a config file can't be loaded

When generating SQL files via the repotools alembic_creator.py script, a
configuration object is used programatically with SQLAlechemy, as opposed to
a configuration file. This patch ignores failures to interpret a config file,
as ... there isn't one in this case.

Modified:
    branches/12/contrib/ast-db-manage/cdr/env.py

Modified: branches/12/contrib/ast-db-manage/cdr/env.py
URL: http://svnview.digium.com/svn/asterisk/branches/12/contrib/ast-db-manage/cdr/env.py?view=diff&rev=414763&r1=414762&r2=414763
==============================================================================
--- branches/12/contrib/ast-db-manage/cdr/env.py (original)
+++ branches/12/contrib/ast-db-manage/cdr/env.py Wed May 28 12:43:36 2014
@@ -9,7 +9,10 @@
 
 # Interpret the config file for Python logging.
 # This line sets up loggers basically.
-fileConfig(config.config_file_name)
+try:
+    fileConfig(config.config_file_name)
+except:
+    pass
 
 # add your model's MetaData object here
 # for 'autogenerate' support




More information about the asterisk-commits mailing list