зеркало из https://github.com/github/vitess-gh.git
Fix some pylint issues to try to trigger Travis.
This commit is contained in:
Родитель
59cd68f07d
Коммит
a8cad68191
|
@ -101,7 +101,7 @@ class MariaDB(MysqlFlavor):
|
|||
return gtid
|
||||
|
||||
def change_master_commands(self, host, port, pos):
|
||||
(_flavor, gtid) = pos.split("/")
|
||||
gtid = pos.split("/")[1]
|
||||
return [
|
||||
"SET GLOBAL gtid_slave_pos = '%s'" % gtid,
|
||||
"CHANGE MASTER TO MASTER_HOST='%s', MASTER_PORT=%d, "
|
||||
|
@ -110,7 +110,7 @@ class MariaDB(MysqlFlavor):
|
|||
|
||||
|
||||
class MySQL56(MysqlFlavor):
|
||||
"""Overrides specific to MySQL 5.6"""
|
||||
"""Overrides specific to MySQL 5.6."""
|
||||
|
||||
def master_position(self, tablet):
|
||||
gtid = tablet.mquery("", "SELECT @@GLOBAL.gtid_executed")[0][0]
|
||||
|
@ -135,7 +135,7 @@ class MySQL56(MysqlFlavor):
|
|||
return environment.vttop + "/config/mycnf/master_mysql56.cnf"
|
||||
|
||||
def change_master_commands(self, host, port, pos):
|
||||
(_flavor, gtid) = pos.split("/")
|
||||
gtid = pos.split("/")[1]
|
||||
return [
|
||||
"RESET MASTER",
|
||||
"SET GLOBAL gtid_purged = '%s'" % gtid,
|
||||
|
@ -162,7 +162,7 @@ def set_mysql_flavor(flavor):
|
|||
if not flavor:
|
||||
flavor = os.environ.get("MYSQL_FLAVOR", "MariaDB")
|
||||
# The environment variable might be set, but equal to "".
|
||||
if flavor == "":
|
||||
if not flavor:
|
||||
flavor = "MariaDB"
|
||||
|
||||
# Set the environment variable explicitly in case we're overriding it via
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import warnings
|
||||
# Dropping a table inexplicably produces a warning despite
|
||||
# the "IF EXISTS" clause. Squelch these warnings.
|
||||
warnings.simplefilter('ignore')
|
||||
|
||||
import unittest
|
||||
|
||||
import environment
|
||||
import tablet
|
||||
import utils
|
||||
|
||||
# Dropping a table inexplicably produces a warning despite
|
||||
# the "IF EXISTS" clause. Squelch these warnings.
|
||||
warnings.simplefilter('ignore')
|
||||
|
||||
master_tablet = tablet.Tablet()
|
||||
replica_tablet = tablet.Tablet()
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче