Commit 5487906b authored by Vladimir Komarov's avatar Vladimir Komarov Committed by Andrey Vertiprahov
Browse files

#1594 Error radius timeout

parent 10dfe52b
......@@ -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