[bugfix] Trying to fix a race condition that happens on empty graphs sometimes, on some computers.
This commit is contained in:
@ -50,13 +50,15 @@ class ConsoleOutputPlugin(Plugin):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def initialize(self):
|
def __init__(self, context):
|
||||||
|
super(ConsoleOutputPlugin, self).__init__(context)
|
||||||
self.prefix = ''
|
self.prefix = ''
|
||||||
self.counter = 0
|
self.counter = 0
|
||||||
self._append_cache = ''
|
self._append_cache = ''
|
||||||
self.isatty = sys.stdout.isatty()
|
self.isatty = sys.stdout.isatty()
|
||||||
self.iswindows = (sys.platform == 'win32')
|
self.iswindows = (sys.platform == 'win32')
|
||||||
|
|
||||||
|
def initialize(self):
|
||||||
self._stdout = sys.stdout
|
self._stdout = sys.stdout
|
||||||
self.stdout = IOBuffer()
|
self.stdout = IOBuffer()
|
||||||
self.redirect_stdout = redirect_stdout(self._stdout if self.iswindows else self.stdout)
|
self.redirect_stdout = redirect_stdout(self._stdout if self.iswindows else self.stdout)
|
||||||
|
|||||||
Reference in New Issue
Block a user