Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
rpteam
wantzel
Commits
8c95ae6c
Commit
8c95ae6c
authored
Feb 16, 2016
by
Mindiell
Browse files
Issue
#15
: Simplified exception handling.
parent
d7af98dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
wantzel.py
View file @
8c95ae6c
...
...
@@ -46,12 +46,8 @@ class Utils(object):
with
open
(
LOG_FILE
,
'a'
)
as
file_handle
:
try
:
file_handle
.
write
(
"%s: %s
\n
"
%
(
actual_time
,
message
.
encode
(
"utf-8"
)))
except
Exception
:
file_handle
.
write
(
"%s: Erreur de log
\n
"
%
actual_time
)
try
:
file_handle
.
write
(
"%s: %s
\n
"
%
(
actual_time
,
message
))
except
Exception
:
file_handle
.
write
(
"%s: Seconde erreur de log
\n
"
%
actual_time
)
except
UnicodeDecodeError
:
file_handle
.
write
(
"%s: %s
\n
"
%
(
actual_time
,
message
))
@
classmethod
def
debug
(
cls
,
message
):
...
...
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