Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Benjamin Graillot
scripts
Commits
80fe6ce9
Commit
80fe6ce9
authored
Dec 13, 2017
by
Michaël Paulon
Browse files
On force les numéros de prises à deux chiffres
parent
c9fd2e17
Changes
1
Hide whitespace changes
Inline
Side-by-side
freeradius/3.0/auth.py
View file @
80fe6ce9
...
@@ -928,7 +928,7 @@ class RadiusEventHandler(object):
...
@@ -928,7 +928,7 @@ class RadiusEventHandler(object):
"""Renvoie la chambre associé à un NAS et une prise donnée d'une part
"""Renvoie la chambre associé à un NAS et une prise donnée d'une part
et l'ensemble des adhérents y résidant d'autre part"""
et l'ensemble des adhérents y résidant d'autre part"""
nas_id
=
nas_id
.
replace
(
'-'
,
''
)
nas_id
=
nas_id
.
replace
(
'-'
,
''
)
plug
=
"%
s%s
"
%
(
nas_id
[
3
:],
port
)
plug
=
"%
d%02d
"
%
(
int
(
nas_id
[
3
:]
)
,
int
(
port
)
)
logger
.
debug
(
'Trying to find a match by room (plug %s)'
,
plug
)
logger
.
debug
(
'Trying to find a match by room (plug %s)'
,
plug
)
building
,
plug_nb
=
plug
[
0
],
plug
[
1
:]
building
,
plug_nb
=
plug
[
0
],
plug
[
1
:]
room
=
reverse
(
building
,
plug_nb
)
room
=
reverse
(
building
,
plug_nb
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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