mirror of https://github.com/docker/docker-py.git
Style fixes for flake8
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
This commit is contained in:
parent
016a4d961c
commit
ef009e114a
|
@ -276,10 +276,9 @@ class Client(requests.Session):
|
||||||
if not length:
|
if not length:
|
||||||
break
|
break
|
||||||
data = recvall(socket, length)
|
data = recvall(socket, length)
|
||||||
if data:
|
if not data:
|
||||||
yield data
|
|
||||||
else:
|
|
||||||
break
|
break
|
||||||
|
yield data
|
||||||
|
|
||||||
def attach(self, container):
|
def attach(self, container):
|
||||||
socket = self.attach_socket(container)
|
socket = self.attach_socket(container)
|
||||||
|
|
|
@ -274,6 +274,7 @@ class TestLogs(BaseTestCase):
|
||||||
logs = self.client.logs(id)
|
logs = self.client.logs(id)
|
||||||
self.assertEqual(logs, snippet + '\n')
|
self.assertEqual(logs, snippet + '\n')
|
||||||
|
|
||||||
|
|
||||||
class TestLogsStreaming(BaseTestCase):
|
class TestLogsStreaming(BaseTestCase):
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
snippet = 'Flowering Nights (Sakuya Iyazoi)'
|
snippet = 'Flowering Nights (Sakuya Iyazoi)'
|
||||||
|
@ -292,6 +293,7 @@ class TestLogsStreaming(BaseTestCase):
|
||||||
|
|
||||||
self.assertEqual(logs, snippet + '\n')
|
self.assertEqual(logs, snippet + '\n')
|
||||||
|
|
||||||
|
|
||||||
class TestLogsWithDictInsteadOfId(BaseTestCase):
|
class TestLogsWithDictInsteadOfId(BaseTestCase):
|
||||||
def runTest(self):
|
def runTest(self):
|
||||||
snippet = 'Flowering Nights (Sakuya Iyazoi)'
|
snippet = 'Flowering Nights (Sakuya Iyazoi)'
|
||||||
|
|
Loading…
Reference in New Issue