Commit 861d6bf4 authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Merge branch 'vak-1594' into 'master'

#1594 Error radius timeout

See merge request !5447
parents b4f8dc2d 5487906b
Pipeline #32162 passed with stages
in 50 minutes and 31 seconds
......@@ -7,7 +7,7 @@
# Third-party modules
from pyrad.packet import AccessAccept, AccessRequest
from pyrad.client import Client
from pyrad.client import Client, Timeout
from pyrad.dictionary import Dictionary
from noc.core.comp import smart_bytes
......@@ -29,7 +29,7 @@ class RADIUSBackend(BaseAuthBackend):
req["User-Password"] = req.PwCrypt(password)
reply = client.SendPacket(req)
except client.Timeout:
except Timeout:
raise self.LoginError("Timed out")
if reply.code != AccessAccept:
raise self.LoginError("RADIUS Authentication failed. Code=%s", reply.code)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment