Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
slapos.toolbox
Commits
4407749e
Commit
4407749e
authored
Apr 15, 2020
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runner: getSlapgridResult shouldn't return 500 in case of issue
parent
cfda77c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
slapos/runner/utils.py
slapos/runner/utils.py
+9
-3
No files found.
slapos/runner/utils.py
View file @
4407749e
...
...
@@ -341,10 +341,16 @@ def isSoftwareRunning(config):
def
getSlapgridResult
(
config
,
step
):
filename
=
step
+
"_info.json"
file
=
os
.
path
.
join
(
config
[
'runner_workdir'
],
filename
)
result
=
{
'last_build'
:
0
,
'success'
:
-
1
}
if
os
.
path
.
exists
(
file
):
result
=
json
.
loads
(
open
(
file
,
"r"
).
read
())
else
:
result
=
{
'last_build'
:
0
,
'success'
:
-
1
}
try
:
with
open
(
file
,
"r"
)
as
f
:
result
=
json
.
loads
(
f
.
read
())
except
ValueError
:
# It seems this call can fail with
# ValueError("No JSON object could be decoded")
# Probably the file is being written at the same time ?
pass
return
result
...
...
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