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