aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon Lund Steffensen <jonlst@gmail.com>2014-11-03 20:37:48 -0500
committerJon Lund Steffensen <jonlst@gmail.com>2014-11-03 20:37:48 -0500
commitc42f93511844b118ebb3920d2478c1df61475b1a (patch)
treee026b79b66aeba97e593e47c40bd7fd8f422676e /src
parentREADME: Fix markdown syntax (diff)
downloadredshift-ng-c42f93511844b118ebb3920d2478c1df61475b1a.tar.gz
redshift-ng-c42f93511844b118ebb3920d2478c1df61475b1a.tar.bz2
redshift-ng-c42f93511844b118ebb3920d2478c1df61475b1a.tar.xz
Fix #112: Do not buffer lines from child indefinitely
Diffstat (limited to 'src')
-rw-r--r--src/redshift-gtk/statusicon.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/redshift-gtk/statusicon.py b/src/redshift-gtk/statusicon.py
index 3e66649..04a944f 100644
--- a/src/redshift-gtk/statusicon.py
+++ b/src/redshift-gtk/statusicon.py
@@ -164,9 +164,11 @@ class RedshiftStatusIcon(object):
self.suspend_timer = None
# Handle child input
+ # The buffer is encapsulated in a class so we
+ # can pass an instance to the child callback.
class InputBuffer(object):
- lines = []
buf = ''
+
self.input_buffer = InputBuffer()
self.error_buffer = InputBuffer()
@@ -316,7 +318,6 @@ class RedshiftStatusIcon(object):
if sep == '':
break
ib.buf = last
- ib.lines.append(first)
if stdout:
self.child_stdout_line_cb(first)