From 47c4c209531b1aa2a34aa936462c9b473a1d5856 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 30 Oct 2023 15:03:46 +1100 Subject: [PATCH] lib-server: catch errors from Tile:bury When we call Tile:bury, the tile pane might already be read which would result in an error. But we don't care, so catch it. This happens when the client-side is run with "-t". Signed-off-by: NeilBrown --- DOC/TODO.md | 17 ++++++++++------- python/lib-server.py | 7 ++++++- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/DOC/TODO.md b/DOC/TODO.md index 9d642095..c936a76a 100644 --- a/DOC/TODO.md +++ b/DOC/TODO.md @@ -43,6 +43,11 @@ the file. - [ ] notmuch - capture errors about multiple Subject lines and display them better. - [ ] switch display-pygtk to use Draw:scale-image +- [ ] when add address to a query in notmuch, reassess the current + query. Maybe don't reload, but make sure that next reload will + used updated query. +- [ ] get too many Failed:: C-N C-P Up C-R history:C-R A-! + Maybe these should return Efalse, not Efail ### Small @@ -269,6 +274,11 @@ Module features - [ ] catch broken-pipe errors when sending to sock - [ ] ctrl-z in elc doesn't ask edlib to release the terminal - [ ] do we need both .term and .disp? When are they different? +- [ ] Catch broken-pipe in all sock.send calls +- [ ] elc: run edlib in background first if no socket +- [ ] option to create a new frame +- [ ] improve protocol + ### lib-x11selection-xcb @@ -540,13 +550,6 @@ Module features - [ ] Detect ^M in output and handle it... delete from start of line? - [ ] always track time for a run and report it - or at least make it available -### edlibclient -- [ ] Catch broken-pipe in all sock.send calls -- [ ] run edlib directly if no socket -- [ ] option to create a new frame -- [ ] more work on server mode: -- [ ] improve protocol - ### line count - [ ] Find a way to locate mark faster than walking the whole list diff --git a/python/lib-server.py b/python/lib-server.py index 11499f6a..d9aa82a9 100755 --- a/python/lib-server.py +++ b/python/lib-server.py @@ -269,7 +269,12 @@ if sys.argv[0] == "": focus.call("doc:notify:doc:done") # FIXME need something better than 'bury' # If it was already visible, it should stay that way - focus.call("Tile:bury") + + # tile might already be closed, so catch errors + try: + focus.call("Tile:bury") + except edlib.commandfailed: + pass else: # Find and visit a doc waiting to be done choice = [] -- 2.39.5