Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
scripts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Benjamin Graillot
scripts
Commits
28cfce09
Commit
28cfce09
authored
Nov 13, 2015
by
Gabriel Detraz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Si il n'y a pas de suffixe, on le rajoute pour eviter les prb
parent
f943cf52
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
gestion/dialog/adherent.py
gestion/dialog/adherent.py
+2
-2
gestion/dialog/machine.py
gestion/dialog/machine.py
+1
-1
No files found.
gestion/dialog/adherent.py
View file @
28cfce09
...
...
@@ -363,10 +363,10 @@ class Dialog(proprio.Dialog):
new_debutconnexion
=
max
(
now
,
finconnexion
)
con_month
=
new_debutconnexion
.
month
con_year
=
new_debutconnexion
.
year
new_finconnexion
=
max
(
finconnexion
,
now
).
replace
(
year
=
con_year
+
((
con_month
+
mois
)
//
1
2
),
month
=
(
con_month
+
mois
-
1
)
%
12
+
1
)
new_finconnexion
=
max
(
finconnexion
,
now
).
replace
(
year
=
con_year
+
((
con_month
+
mois
)
//
1
3
),
month
=
(
con_month
+
mois
-
1
)
%
12
+
1
)
if
(
new_finconnexion
-
finadhesion
.
value
).
days
>
0
:
t_end_adh
=
finadhesion
.
value
()
t_end_adh
=
finadhesion
.
value
t_end_conn
=
finconnexion
if
(
new_finconnexion
-
finadhesion
.
value
).
days
>
30
:
raise
ValueError
(
"Impossible de prolonger la connexion jusqu'au %s plus d'un mois après la fin de l'adhésion au %s"
%
(
t_end_conn
,
t_end_adh
))
...
...
gestion/dialog/machine.py
View file @
28cfce09
...
...
@@ -74,7 +74,7 @@ class Dialog(certificat.Dialog, blacklist.Dialog):
raise
ValueError
(
"La machine n'est ni une machine fixe, ni une machine wifi mais %s ?!?"
%
objectClass
)
if
not
host
.
endswith
(
hostend
)
and
not
'.'
in
host
:
host
=
"%s.wifi.crans.org"
%
host
host
=
host
+
hostend
elif
host
.
endswith
(
hostend
)
and
'.'
in
host
[:
-
len
(
hostend
)]:
raise
ValueError
(
"Nom d'hôte invalide, devrait finir par %s et être sans point dans la première partie"
%
hostend
)
elif
not
host
.
endswith
(
hostend
)
and
'.'
in
host
:
...
...
Write
Preview
Markdown
is supported
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