Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
docker-py
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
docker-py
Commits
ec642f37
Kaydet (Commit)
ec642f37
authored
Şub 12, 2015
tarafından
Joffrey F
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge pull request #492 from ggtools/json-stats
Add decode parameter to be able to the the stats as a dictionary
üst
21e189c9
26e74c8c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
client.py
docker/client.py
+2
-2
No files found.
docker/client.py
Dosyayı görüntüle @
ec642f37
...
...
@@ -869,7 +869,7 @@ class Client(requests.Session):
res
=
self
.
_post_json
(
url
,
data
=
start_config
)
self
.
_raise_for_status
(
res
)
def
stats
(
self
,
container
):
def
stats
(
self
,
container
,
decode
=
None
):
if
utils
.
compare_version
(
'1.17'
,
self
.
_version
)
<
0
:
raise
errors
.
InvalidVersion
(
'Stats retrieval is not supported in API < 1.17!'
)
...
...
@@ -877,7 +877,7 @@ class Client(requests.Session):
if
isinstance
(
container
,
dict
):
container
=
container
.
get
(
'Id'
)
url
=
self
.
_url
(
"/containers/{0}/stats"
.
format
(
container
))
return
self
.
_stream_helper
(
self
.
_get
(
url
,
stream
=
True
))
return
self
.
_stream_helper
(
self
.
_get
(
url
,
stream
=
True
)
,
decode
=
decode
)
def
stop
(
self
,
container
,
timeout
=
10
):
if
isinstance
(
container
,
dict
):
...
...
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