fix chars variable

This commit is contained in:
VirtuBox
2019-04-03 07:19:26 +02:00
parent 71b7ada96e
commit 2c8b03ac5c

View File

@@ -1154,19 +1154,21 @@ class WOStackController(CementBaseController):
except CommandExecutionError as e: except CommandExecutionError as e:
raise SiteError("Unable to import Anemometer database") raise SiteError("Unable to import Anemometer database")
WOMysql.execute(self, 'grant select on *.* to \'anemometer\'' WOMysql.execute(self, 'grant select on'
'@\'{0}\' IDENTIFIED' ' *.* to \'anemometer\''
' BY \'{1}\''.format(self.app.config.get '@\'{0}\' IDENTIFIED'
('mysql', 'grant-host'), ' BY \'{1}\''.format(self.app.config.get
chars)) ('mysql', 'grant-host'),
Log.debug(self, "grant all on slow-query-log.*" chars))
" to anemometer@root_user IDENTIFIED BY password ") Log.debug(self, "grant all on slow-query-log.*"
WOMysql.execute(self, 'grant all on slow_query_log.* to' " to anemometer@root_user"
'\'anemometer\'@\'{0}\' IDENTIFIED' " IDENTIFIED BY password ")
' BY \'{1}\''.format(self.app.config.get( WOMysql.execute(self, 'grant all on slow_query_log.* to'
'mysql', 'grant-host'), '\'anemometer\'@\'{0}\' IDENTIFIED'
chars), ' BY \'{1}\''.format(self.app.config.get(
errormsg="cannot grant priviledges", log=False) 'mysql', 'grant-host'),
chars),
errormsg="cannot grant priviledges", log=False)
# Custom Anemometer configuration # Custom Anemometer configuration
Log.debug(self, "configration Anemometer") Log.debug(self, "configration Anemometer")