From 06dc6b6e35480737badade5d7584f2a3e91ea538 Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Sun, 29 Oct 2017 23:22:45 +0100 Subject: [PATCH] [bugfix] Trying to fix a race condition that happens on empty graphs sometimes, on some computers. --- bonobo/ext/console.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bonobo/ext/console.py b/bonobo/ext/console.py index 1053e04..577b345 100644 --- a/bonobo/ext/console.py +++ b/bonobo/ext/console.py @@ -50,13 +50,15 @@ class ConsoleOutputPlugin(Plugin): """ - def initialize(self): + def __init__(self, context): + super(ConsoleOutputPlugin, self).__init__(context) self.prefix = '' self.counter = 0 self._append_cache = '' self.isatty = sys.stdout.isatty() self.iswindows = (sys.platform == 'win32') + def initialize(self): self._stdout = sys.stdout self.stdout = IOBuffer() self.redirect_stdout = redirect_stdout(self._stdout if self.iswindows else self.stdout)