Fix LP Bug #779074 - TypeError in on_key_press_event(): cannot concatenate 'str' and 'NoneType'
This commit is contained in:
parent
6a8e3f1c49
commit
bc5b4d902f
|
@ -567,9 +567,10 @@ class TorrentView(listview.ListView, component.Component):
|
||||||
# Handle keyboard shortcuts
|
# Handle keyboard shortcuts
|
||||||
def on_key_press_event(self, widget, event):
|
def on_key_press_event(self, widget, event):
|
||||||
keyname = gtk.gdk.keyval_name(event.keyval)
|
keyname = gtk.gdk.keyval_name(event.keyval)
|
||||||
func = getattr(self, 'keypress_' + keyname, None)
|
if keyname is not None:
|
||||||
if func:
|
func = getattr(self, 'keypress_' + keyname, None)
|
||||||
return func(event)
|
if func:
|
||||||
|
return func(event)
|
||||||
|
|
||||||
def keypress_Delete(self, event):
|
def keypress_Delete(self, event):
|
||||||
log.debug("keypress_Delete")
|
log.debug("keypress_Delete")
|
||||||
|
|
Loading…
Reference in New Issue