Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
allgo
allgo
Commits
5f9324e6
Commit
5f9324e6
authored
Jun 26, 2018
by
BAIRE Anthony
Browse files
prevent exception if allgo.log contains invalid UTF-8 chars
parent
7982242d
Pipeline
#30217
failed with stage
in 45 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
django/allgo/main/views.py
View file @
5f9324e6
...
...
@@ -509,7 +509,7 @@ class JobDetail(LoginRequiredMixin, DetailView):
else
:
log_file
=
os
.
path
.
join
(
dirname
,
'allgo.log'
)
if
os
.
path
.
isfile
(
log_file
):
with
open
(
log_file
,
'r'
)
as
log_data
:
with
open
(
log_file
,
'r'
,
errors
=
"replace"
)
as
log_data
:
logs
=
log_data
.
read
()
else
:
logs
=
'Can
\'
t load the log file'
...
...
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