Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Astreos_Arduino
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hicham Brahimi
Astreos_Arduino
Commits
c9ef8c96
Commit
c9ef8c96
authored
5 years ago
by
root
Browse files
Options
Downloads
Patches
Plain Diff
Ajout du checker pour la surveillance
parent
02a46abb
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
PC/server.py
+13
-3
13 additions, 3 deletions
PC/server.py
with
13 additions
and
3 deletions
PC/server.py
+
13
−
3
View file @
c9ef8c96
...
...
@@ -27,7 +27,7 @@ while True:
client
,
addr
=
server
.
accept
()
#print("Client acceptee : ", addr)
log
.
write
(
str
(
datetime
.
now
())
+
"
=> Client acceptee :
"
+
addr
+
"
\n
"
)
log
.
write
(
str
(
datetime
.
now
())
+
"
=> Client acceptee :
"
+
str
(
addr
)
+
"
\n
"
)
name
=
datetime
.
now
().
strftime
(
"
%d-%m-%Y_%H.%M.%S
"
)
file
=
open
(
"
data/
"
+
name
,
"
wb
"
)
...
...
@@ -48,7 +48,8 @@ while True:
break
#print(" -> chunk")
except
KeyboardInterrupt
:
if
file
is
not
None
:
file
.
close
()
...
...
@@ -59,7 +60,14 @@ while True:
log
.
write
(
str
(
datetime
.
now
())
+
"
==> End Keyboard
\n
"
)
log
.
close
()
sys
.
exit
(
0
)
except
OSError
as
ex
:
log
.
write
(
str
(
datetime
.
now
())
+
"
==> Exception
"
+
str
(
type
(
ex
))
+
"
(
"
+
str
(
ex
.
args
)
+
"
)
\n
"
)
try
:
server
.
close
()
except
:
pass
time
.
sleep
(
60
)
except
Exception
as
ex
:
#print("Exception ", type(ex))
log
.
write
(
str
(
datetime
.
now
())
+
"
==> Exception
"
+
str
(
type
(
ex
))
+
"
(
"
+
str
(
ex
.
args
)
+
"
)
\n
"
)
...
...
@@ -67,3 +75,5 @@ while True:
server
.
close
()
except
:
pass
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment