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
A
amap
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
groupe-amap
amap
Commits
978744bf
Commit
978744bf
authored
Jan 21, 2019
by
Grizzly
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'master'
Correction d'un bug avec le paiement par note Kfet See merge request
!2
parents
f78f0209
4b62293d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
panier/note.py
panier/note.py
+8
-2
No files found.
panier/note.py
View file @
978744bf
...
...
@@ -16,7 +16,14 @@ def get_response(socket):
length_str
+=
char
char
=
socket
.
recv
(
1
)
total
=
int
(
length_str
)
return
json
.
loads
(
socket
.
recv
(
total
).
decode
(
'utf-8'
))
# socket.recv() ne renvoie pas toujours _toutes_ les données demandées
# en particulier quand il y en a beaucoup (beaucoup d'alias note par exemple...)
answer
=
b
''
while
len
(
answer
)
<
total
:
answer
+=
socket
.
recv
(
total
-
len
(
answer
))
return
json
.
loads
(
answer
.
decode
(
'utf-8'
))
def
connect
(
server
,
port
):
sock
=
socket
.
socket
()
...
...
@@ -70,4 +77,3 @@ def don(sock, montant, id_note):
return
(
False
,
"Erreur inconnue "
+
str
(
retcode
))
except
:
return
(
False
,
"Erreur de communication avec le serveur"
)
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