Remove string concatenation in favor of string formatting

Some of the modules still utilized string concatenation
instead of using formatting.  In order to align with other
modules in the project, I refactored these modules to use string
formatting instead.

Change-Id: I708392e1d03b6331a134419aa0ae9dc02a05c31b
Closes-Bug: 1522738
This commit is contained in:
Steve Wilkerson
2015-12-09 08:38:52 -06:00
committed by Jean-Emile DARTOIS
parent 62570525ad
commit 1c49d07912
8 changed files with 20 additions and 31 deletions

View File

@@ -33,14 +33,14 @@ from sqlalchemy.types import TypeDecorator, TEXT
from watcher.common import paths
sql_opts = [
cfg.StrOpt('mysql_engine',
default='InnoDB',
help='MySQL engine to use.')
]
_DEFAULT_SQL_CONNECTION = 'sqlite:///' + paths.state_path_def('watcher.sqlite')
_DEFAULT_SQL_CONNECTION = 'sqlite:///{0}'.format(
paths.state_path_def('watcher.sqlite'))
cfg.CONF.register_opts(sql_opts, 'database')
db_options.set_defaults(cfg.CONF, _DEFAULT_SQL_CONNECTION, 'watcher.sqlite')