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
09e0d1c5
Commit
09e0d1c5
authored
Apr 16, 2014
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7029 from mattjbray/docker-api-error
docker.client.APIError has moved to docker.errors.APIError
parents
a37a8424
3948dc2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
library/cloud/docker
+6
-1
No files found.
library/cloud/docker
View file @
09e0d1c5
...
@@ -306,6 +306,11 @@ try:
...
@@ -306,6 +306,11 @@ try:
except
ImportError
,
e
:
except
ImportError
,
e
:
HAS_DOCKER_PY
=
False
HAS_DOCKER_PY
=
False
try
:
from
docker.errors
import
APIError
as
DockerAPIError
except
ImportError
:
from
docker.client
import
APIError
as
DockerAPIError
def
_human_to_bytes
(
number
):
def
_human_to_bytes
(
number
):
suffixes
=
[
'B'
,
'KB'
,
'MB'
,
'GB'
,
'TB'
,
'PB'
]
suffixes
=
[
'B'
,
'KB'
,
'MB'
,
'GB'
,
'TB'
,
'PB'
]
...
@@ -730,7 +735,7 @@ def main():
...
@@ -730,7 +735,7 @@ def main():
module
.
exit_json
(
failed
=
failed
,
changed
=
changed
,
msg
=
msg
,
ansible_facts
=
_ansible_facts
(
facts
))
module
.
exit_json
(
failed
=
failed
,
changed
=
changed
,
msg
=
msg
,
ansible_facts
=
_ansible_facts
(
facts
))
except
docker
.
client
.
APIError
,
e
:
except
Docker
APIError
,
e
:
changed
=
manager
.
has_changed
()
changed
=
manager
.
has_changed
()
module
.
exit_json
(
failed
=
True
,
changed
=
changed
,
msg
=
"Docker API error: "
+
e
.
explanation
)
module
.
exit_json
(
failed
=
True
,
changed
=
changed
,
msg
=
"Docker API error: "
+
e
.
explanation
)
...
...
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