Add messages on idle so that we don't break
This commit is contained in:
parent
9ebcd65659
commit
0f3c33de86
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user