Skip to content

Commit 6350666

Browse files
committed
[FIX] server: do not log BrokenPipeError sent from PyGLS
If a BrokenPipeError occurs, it is catched by PyGLS, and do not enter in our try...except. Then we should avoid to log when it is raised by PyGLS.
1 parent 14f4173 commit 6350666

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/odoo_language_server.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ def __init__(self):
2828
super().__init__(name=EXTENSION_NAME, version=EXTENSION_VERSION)
2929

3030
def report_server_error(self, error: Exception, source):
31+
if isinstance(error, BrokenPipeError):
32+
exit(1)
3133
try:
3234
odoo_server.show_message_log(traceback.format_exc(), MessageType.Error)
3335
odoo_server.send_notification("Odoo/displayCrashNotification", {"crashInfo": traceback.format_exc()})

0 commit comments

Comments
 (0)