Handle Exception when there is no KEY_Insert

This happens on MacOSX
This commit is contained in:
Philipp Hörist 2017-01-05 01:14:18 +01:00
parent 09c82c319a
commit 277e13bdd8
1 changed files with 3 additions and 0 deletions

View File

@ -75,6 +75,9 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
keycode_ins = keymap.get_entries_for_keyval(Gdk.KEY_Insert)[1][0].keycode
except TypeError:
keycode_ins = 118
except IndexError:
# There is no KEY_Insert (MacOS)
keycode_ins = None
def make_href(self, match):
url_color = gajim.config.get('urlmsgcolor')