# Interpret the config file for Python logging.
# This line sets up loggers basically.
-fileConfig(config.config_file_name)
+if config.config_file_name is not None:
+ fileConfig(config.config_file_name)
# add your model's MetaData object here
# for 'autogenerate' support
# Interpret the config file for Python logging.
# This line sets up loggers basically.
-fileConfig(config.config_file_name)
+if config.config_file_name is not None:
+ fileConfig(config.config_file_name)
# add your model's MetaData object here
# for 'autogenerate' support
# Interpret the config file for Python logging.
# This line sets up loggers basically.
-fileConfig(config.config_file_name)
+if config.config_file_name is not None:
+ fileConfig(config.config_file_name)
logger = logging.getLogger("alembic.env")
# gather section names referring to different
# can use config['__file__'] here, i.e. the Pylons
# ini file, instead of alembic.ini
config_file = config.get_main_option("pylons_config_file")
- fileConfig(config_file)
+ if config_file is not None:
+ fileConfig(config_file)
wsgi_app = loadapp("config:%s" % config_file, relative_to=".")
--- /dev/null
+.. change::
+ :tags: bug, environment
+ :tickets: 986
+
+ The ``fileConfig()`` line in the ``env.py`` templates is now conditional on
+ ``Config.config_file_name`` not being None.
+