Fixed following SonarQube issues:

1. Method/Field names should comply with a naming convention.
 2. Conditionals should start on new lines
This commit is contained in:
Satish V
2020-06-26 13:32:45 +05:30
committed by Akshay Joshi
parent 5206dafb35
commit 830ac1cc91
7 changed files with 20 additions and 18 deletions

View File

@@ -67,7 +67,7 @@ class BaseDriver(object):
pass
@abstractmethod
def gc(self):
def gc_timeout(self):
pass

View File

@@ -197,7 +197,7 @@ class Driver(BaseDriver):
str(sid) in self.managers[session.sid]:
del self.managers[session.sid][str(sid)]
def gc(self):
def gc_timeout(self):
"""
Release the connections for the sessions, which have not pinged the
server for more than config.MAX_SESSION_IDLE_TIME.

View File

@@ -148,24 +148,24 @@ class ServerManager(object):
return res
def ServerVersion(self):
def server_version(self):
return self.ver
@property
def version(self):
return self.sversion
def MajorVersion(self):
def major_version(self):
if self.sversion is not None:
return int(self.sversion / 10000)
raise Exception(gettext("Information is not available."))
def MinorVersion(self):
def minor_version(self):
if self.sversion:
return int(int(self.sversion / 100) % 100)
raise Exception(gettext("Information is not available."))
def PatchVersion(self):
def patch_version(self):
if self.sversion:
return int(int(self.sversion / 100) / 100)
raise Exception(gettext("Information is not available."))