mirror of https://github.com/docker/compose.git
Merge pull request #2055 from dnephin/fix_queue_lock
Fix stacktrace when ctrl-c stops logs
This commit is contained in:
commit
718f9bea17
|
@ -2,6 +2,8 @@ from __future__ import absolute_import
|
||||||
|
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
|
||||||
|
from six.moves import _thread as thread
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from Queue import Queue, Empty
|
from Queue import Queue, Empty
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -38,6 +40,9 @@ class Multiplexer(object):
|
||||||
yield item
|
yield item
|
||||||
except Empty:
|
except Empty:
|
||||||
pass
|
pass
|
||||||
|
# See https://github.com/docker/compose/issues/189
|
||||||
|
except thread.error:
|
||||||
|
raise KeyboardInterrupt()
|
||||||
|
|
||||||
def _init_readers(self):
|
def _init_readers(self):
|
||||||
for iterator in self.iterators:
|
for iterator in self.iterators:
|
||||||
|
|
Loading…
Reference in New Issue