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())
|
||||
try:
|
||||
await proc.stdin.drain()
|
||||
except BrokenPipeError:
|
||||
log.error("zelbar: broken pipe, killing")
|
||||
proc.kill()
|
||||
except (BrokenPipeError, ConnectionResetError):
|
||||
log.exception("zelbar: broken pipe")
|
||||
log.debug("proc.returncode = %s", str(proc.returncode))
|
||||
return
|
||||
await self.refresh.wait()
|
||||
self.refresh.clear()
|
||||
|
|
@ -399,8 +399,11 @@ class Screen(ComposableText):
|
|||
log.error("Unknown command: %s", command)
|
||||
continue
|
||||
callback()
|
||||
log.error("zelbar: EOF reached, killing")
|
||||
proc.kill()
|
||||
log.error("zelbar: EOF reached")
|
||||
# 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))
|
||||
action_handler_task = self.bar.add_long_running_task(action_handler(proc))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue