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
ad208dfd
Kaydet (Commit)
ad208dfd
authored
Ock 28, 2018
tarafından
Frank Sachsenheim
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Container.exec_run returns None as exit_code if stream or socket
Signed-off-by:
Frank Sachsenheim
<
funkyfuture@riseup.net
>
üst
9c0332eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
containers.py
docker/models/containers.py
+7
-5
No files found.
docker/models/containers.py
Dosyayı görüntüle @
ad208dfd
...
...
@@ -152,7 +152,8 @@ class Container(Model):
Returns:
(tuple): A tuple of (exit_code, output)
exit_code: (int):
Exit code for the executed command
Exit code for the executed command or ``None`` if
either ``stream```or ``socket`` is ``True``.
output: (generator or str):
If ``stream=True``, a generator yielding response chunks.
If ``socket=True``, a socket object for the connection.
...
...
@@ -170,10 +171,11 @@ class Container(Model):
exec_output
=
self
.
client
.
api
.
exec_start
(
resp
[
'Id'
],
detach
=
detach
,
tty
=
tty
,
stream
=
stream
,
socket
=
socket
)
exit_code
=
0
if
stream
is
False
:
exit_code
=
self
.
client
.
api
.
exec_inspect
(
resp
[
'Id'
])[
'ExitCode'
]
return
(
exit_code
,
exec_output
)
if
socket
or
stream
:
return
None
,
exec_output
else
:
return
(
self
.
client
.
api
.
exec_inspect
(
resp
[
'Id'
])[
'ExitCode'
],
exec_output
)
def
export
(
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