summaryrefslogtreecommitdiffstats
path: root/py3status/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'py3status/__init__.py')
-rwxr-xr-xpy3status/__init__.py5
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: