a couple of comments

This commit is contained in:
Adolfo Gómez García 2021-06-08 20:58:55 +02:00
parent 3b18597d8e
commit 5884cde35c

View File

@ -116,6 +116,7 @@ class RadiusAuth(auths.Authenticator):
pass
def radiusClient(self) -> client.RadiusClient:
""" Return a new radius client . """
return client.RadiusClient(
self.server.value,
self.secret.value.encode(),
@ -159,6 +160,7 @@ class RadiusAuth(auths.Authenticator):
@staticmethod
def test(env, data):
""" Test the connection to the server . """
try:
auth = RadiusAuth(None, env, data) # type: ignore
return auth.testConnection()
@ -168,7 +170,8 @@ class RadiusAuth(auths.Authenticator):
)
return [False, _('Error testing connection')]
def testConnection(self): # pylint: disable=too-many-return-statements
def testConnection(self):
""" Test connection to Radius Server """
try:
connection = self.radiusClient()
# Reply is not important...