Add messages on idle so that we don't break

This commit is contained in:
Marco Pesenti Gritti 2006-06-13 15:18:04 -04:00
parent 9ebcd65659
commit 0f3c33de86

View File

@ -1,6 +1,7 @@
import os import os
import sys import sys
import dbus import dbus
import gobject
class LogWriter: class LogWriter:
def __init__(self, application): def __init__(self, application):
@ -15,4 +16,8 @@ class LogWriter:
sys.stderr = self sys.stderr = self
def write(self, s): def write(self, s):
self._logger.log(self._application, s) gobject.idle_add(self._write, s)
def _write(self, s):
self._logger.log(self._application, s)
return False