Commit 91084a98 authored by Vladimir Komarov's avatar Vladimir Komarov
Browse files

vak-1594 changed import of Timeout.

parent 5fc3e476
Pipeline #32146 passed with stages
in 16 minutes and 3 seconds
......@@ -6,9 +6,8 @@
# ---------------------------------------------------------------------
# Third-party modules
import pyrad
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
......@@ -30,7 +29,7 @@ class RADIUSBackend(BaseAuthBackend):
req["User-Password"] = req.PwCrypt(password)
try:
reply = client.SendPacket(req)
except pyrad.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