Do not use self in classmethod

cls should be used in classmethod, instead of self.

Change-Id: I3b5bb805a79b25050ed459f85ad25681171aa743
This commit is contained in:
zhufl 2019-01-09 17:28:00 +08:00
parent 53c8b02ec7
commit 7368e5c678
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ class AssignmentType(object):
class Assignment(base.AssignmentDriverBase):
@classmethod
def default_role_driver(self):
def default_role_driver(cls):
return 'sql'
def create_grant(self, role_id, user_id=None, group_id=None,

View File

@ -252,7 +252,7 @@ class DbSync(BaseApp):
return parser
@classmethod
def check_db_sync_status(self):
def check_db_sync_status(cls):
status = 0
try:
expand_version = upgrades.get_db_version(repo='expand_repo')