Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
92b77048
Commit
92b77048
authored
May 12, 2014
by
Matt Martz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle ValueError during json.loads of json data from build
parent
d7256364
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
library/cloud/docker_image
+10
-1
No files found.
library/cloud/docker_image
View file @
92b77048
...
...
@@ -140,7 +140,10 @@ class DockerImageManager:
if
not
chunk
:
continue
chunk_json
=
json
.
loads
(
chunk
)
try
:
chunk_json
=
json
.
loads
(
chunk
)
except
ValueError
:
continue
if
'error'
in
chunk_json
:
self
.
error_msg
=
chunk_json
[
'error'
]
...
...
@@ -153,6 +156,12 @@ class DockerImageManager:
if
match
:
image_id
=
match
.
group
(
1
)
# Just in case we skipped evaluating the JSON returned from build
# during every iteration, add an error if the image_id was never
# populated
if
not
image_id
:
self
.
error_msg
=
'Unknown error encountered'
return
image_id
def
has_changed
(
self
):
...
...
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