mirror of https://github.com/docker/docs.git
Small refactor for clarity
This commit is contained in:
parent
4a729fe47f
commit
aa7a5a1487
|
@ -28,8 +28,8 @@ class LogPrinter(object):
|
||||||
return generators
|
return generators
|
||||||
|
|
||||||
def _make_log_generator(self, container, color_fn):
|
def _make_log_generator(self, container, color_fn):
|
||||||
format = lambda line: color_fn(container.name + " | ") + line
|
prefix = color_fn(container.name + " | ")
|
||||||
return (format(line) for line in self._readlines(self._attach(container)))
|
return (prefix + line for line in self._readlines(self._attach(container)))
|
||||||
|
|
||||||
def _attach(self, container):
|
def _attach(self, container):
|
||||||
params = {
|
params = {
|
||||||
|
|
Loading…
Reference in New Issue