Merge pull request #16299 from hulu/fix-influx

fix InfluxDB log string formatting
This commit is contained in:
Thomas S Hatch 2014-10-01 15:41:35 -06:00
commit 2d2bf49b9c

View File

@ -300,7 +300,7 @@ def user_create(name, passwd, database=None, user=None, password=None,
"""
if user_exists(name, database, user, password, host, port):
if database:
log.info('User {0!r} already exists for DB {0!r}'.format(
log.info('User {0!r} already exists for DB {1!r}'.format(
name, database))
else:
log.info('Cluster admin {0!r} already exists'.format(name))
@ -351,7 +351,7 @@ def user_chpass(name, passwd, database=None, user=None, password=None,
"""
if not user_exists(name, database, user, password, host, port):
if database:
log.info('User {0!r} does not exist for DB {0!r}'.format(
log.info('User {0!r} does not exist for DB {1!r}'.format(
name, database))
else:
log.info('Cluster admin {0!r} does not exist'.format(name))
@ -402,7 +402,7 @@ def user_remove(name, database=None, user=None, password=None, host=None,
"""
if not user_exists(name, database, user, password, host, port):
if database:
log.info('User {0!r} does not exist for DB {0!r}'.format(
log.info('User {0!r} does not exist for DB {1!r}'.format(
name, database))
else:
log.info('Cluster admin {0!r} does not exist'.format(name))