[orca] Fix traceback
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix traceback
- Date: Tue, 17 Nov 2015 04:37:19 +0000 (UTC)
commit 6c29a0256143a0e2aed096f80abfdd4cdf90f929
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Nov 16 23:34:18 2015 -0500
Fix traceback
src/orca/keybindings.py | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/keybindings.py b/src/orca/keybindings.py
index 800ed60..cd88c24 100644
--- a/src/orca/keybindings.py
+++ b/src/orca/keybindings.py
@@ -294,9 +294,12 @@ class KeyBindings:
"""Removes the given KeyBinding instance from this set of keybindings.
"""
- for i in range(0, len(self.keyBindings)):
- if keyBinding == self.keyBindings[i]:
- del self.keyBindings[i]
+ try:
+ i = self.keyBindings.index(keyBinding)
+ except:
+ pass
+ else:
+ del self.keyBindings[i]
def removeByHandler(self, handler):
"""Removes the given KeyBinding instance from this set of keybindings.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]