diff options
| author | Ultrabug <ultrabug@gentoo.org> | 2013-12-01 20:24:56 +0100 |
|---|---|---|
| committer | Ultrabug <ultrabug@gentoo.org> | 2013-12-01 20:24:56 +0100 |
| commit | eb48bbb38953ea82b9ddf0d553fadd3114e978bb (patch) | |
| tree | d54ae3571fde2efe5192fb3e9ccfa7ac43938522 /py3status | |
| parent | 8ce520420052eb992dc41e899261bee482b2720c (diff) | |
fix first event opening line wrt issue #19 thx to @lathan
Diffstat (limited to 'py3status')
| -rwxr-xr-x | py3status/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/py3status/__init__.py b/py3status/__init__.py index d454ab3..bd8072a 100755 --- a/py3status/__init__.py +++ b/py3status/__init__.py @@ -59,6 +59,9 @@ class IOPoller: poll_result = self.poller.poll(timeout) if poll_result: line = self.io.readline().strip() + if self.io == sys.stdin and line == '[': + # skip first event line wrt issue #19 + line = self.io.readline().strip() try: # python3 compatibility code line = line.decode() @@ -263,7 +266,7 @@ class Events(Thread): """ while self.lock.is_set(): event = self.poller_inp.readline() - if not event or event == '[': + if not event: sleep(0.20) continue try: |
