Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.core
Commits
0e40cdc8
Commit
0e40cdc8
authored
Apr 20, 2018
by
Samuel GAIST
Browse files
[dock] Fix key search in dictionaries
parent
54522679
Changes
1
Hide whitespace changes
Inline
Side-by-side
beat/core/dock.py
View file @
0e40cdc8
...
...
@@ -151,7 +151,7 @@ class Host(object):
def
_describe
(
image
):
'''Tries to run the "describe" app on the image, collect results'''
if
Host
.
images_cache
.
has_key
(
image
)
:
if
image
in
Host
.
images_cache
:
return
Host
.
images_cache
[
image
]
cmd
=
[
...
...
@@ -275,7 +275,7 @@ class Host(object):
key
=
description
[
'name'
]
+
' ('
+
description
[
'version'
]
+
')'
if
description
.
has_key
(
'databases'
)
:
if
'databases'
in
description
:
if
(
key
in
db_environments
)
and
not
_must_replace
(
image
,
db_environments
,
key
):
continue
...
...
@@ -327,6 +327,7 @@ class Host(object):
place.
"""
cmd
=
[
'docker'
,
'run'
,
...
...
@@ -462,7 +463,7 @@ class Host(object):
data
=
client
.
stats
(
container
.
id
,
decode
=
True
,
stream
=
False
)
# If CPU statistics can't be retrieved
if
not
data
[
'cpu_stats'
].
has_key
(
'system_cpu_usage'
)
:
if
'system_cpu_usage'
not
in
data
[
'cpu_stats'
]
:
data
[
'cpu_stats'
]
=
dict
(
data
[
'precpu_stats'
])
# If memory statistics can't be retrieved
...
...
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