Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
noc
noc
Commits
91084a98
Commit
91084a98
authored
Jun 10, 2021
by
Vladimir Komarov
Browse files
vak-1594 changed import of Timeout.
parent
5fc3e476
Pipeline
#32146
passed with stages
in 16 minutes and 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
services/login/backends/radius.py
View file @
91084a98
...
...
@@ -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
)
...
...
Andrey Vertiprahov
@aversant
mentioned in commit
e1274d61
·
Jun 11, 2021
mentioned in commit
e1274d61
mentioned in commit e1274d61702e92a02f1fbac97ef6e5d73ecc943f
Toggle commit list
Andrey Vertiprahov
@aversant
mentioned in merge request
!5453 (merged)
·
Jun 11, 2021
mentioned in merge request
!5453 (merged)
mentioned in merge request !5453
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment