Commit e1274d61 authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Merge branch 'vak-1594' into 'master'

#1594 Error radius timeout

See merge request noc/noc!5447

(cherry picked from commit 861d6bf4)

5fc3e476 vak-1594 changed Radius Exception.
91084a98 vak-1594 changed import of Timeout.
parent 804916c3
Pipeline #32163 passed with stages
in 22 minutes and 52 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)
try:
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