frobar: More stuff I don't know anymore
This commit is contained in:
parent
df0886e4ff
commit
0c2f2c9bb4
1 changed files with 8 additions and 5 deletions
|
|
@ -377,9 +377,9 @@ class Screen(ComposableText):
|
||||||
proc.stdin.write(markup.encode())
|
proc.stdin.write(markup.encode())
|
||||||
try:
|
try:
|
||||||
await proc.stdin.drain()
|
await proc.stdin.drain()
|
||||||
except BrokenPipeError:
|
except (BrokenPipeError, ConnectionResetError):
|
||||||
log.error("zelbar: broken pipe, killing")
|
log.exception("zelbar: broken pipe")
|
||||||
proc.kill()
|
log.debug("proc.returncode = %s", str(proc.returncode))
|
||||||
return
|
return
|
||||||
await self.refresh.wait()
|
await self.refresh.wait()
|
||||||
self.refresh.clear()
|
self.refresh.clear()
|
||||||
|
|
@ -399,8 +399,11 @@ class Screen(ComposableText):
|
||||||
log.error("Unknown command: %s", command)
|
log.error("Unknown command: %s", command)
|
||||||
continue
|
continue
|
||||||
callback()
|
callback()
|
||||||
log.error("zelbar: EOF reached, killing")
|
log.error("zelbar: EOF reached")
|
||||||
proc.kill()
|
# Sometimes EOF is reached while the process still runs,
|
||||||
|
# but more often the process dies before reaching here,
|
||||||
|
# so killing is (probably) not an option
|
||||||
|
log.debug("proc.returncode = %s", str(proc.returncode))
|
||||||
|
|
||||||
refresher_task = self.bar.add_long_running_task(refresher(proc))
|
refresher_task = self.bar.add_long_running_task(refresher(proc))
|
||||||
action_handler_task = self.bar.add_long_running_task(action_handler(proc))
|
action_handler_task = self.bar.add_long_running_task(action_handler(proc))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue