Skip to content

Commit 751f94b

Browse files
authored
Add error handling for layout update on macOS (#1771)
1 parent 502c0a4 commit 751f94b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plover/oslayer/osx/keyboardlayout.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,10 @@ def _layout_watcher(self):
135135
class LayoutWatchingCallback(AppKit.NSObject):
136136
def layoutChanged_(self, event):
137137
log.info("Mac keyboard layout changed, updating")
138-
layout._update_layout()
138+
try:
139+
layout._update_layout()
140+
except:
141+
log.warning("error during layout update, ignoring")
139142

140143
center = Foundation.NSDistributedNotificationCenter.defaultCenter()
141144
watcher_callback = LayoutWatchingCallback.new()

0 commit comments

Comments
 (0)